Browse Source

Fix view-show average runtime for IMDb miniseries

Change check if average mini-series runtime is reasonable before displaying it.
Fix exception raised with occasional runtimes var type mismatch.
tags/release_0.25.1
JackDandy 4 years ago
parent
commit
acffd61061
  1. 2
      CHANGES.md
  2. 9
      gui/slick/interfaces/default/displayShow.tmpl
  3. 2
      sickbeard/tv.py

2
CHANGES.md

@ -100,6 +100,8 @@
* Change make card genre case consistent for TVmaze cards
* Fix use correct vartype as list for TVmaze tvinfo show_type property
* Fix mapping show images in tmdb_api
* Fix view-show average runtime for IMDb miniseries
* Change check if average mini-series runtime is reasonable before displaying it
### 0.24.15 (2021-08-05 11:45:00 UTC)

9
gui/slick/interfaces/default/displayShow.tmpl

@ -233,8 +233,13 @@
#set $flags = 'country_codes' in $show_obj.imdb_info and '' != $show_obj.imdb_info['country_codes']
#if 'runtimes' in $show_obj.imdb_info
#set $runtime = $show_obj.imdb_info['runtimes']
#if $show_obj.imdb_info['is_mini_series'] and $runtime
#set $runtime = '%s (av) of %s' % (int($runtime/$show_obj.imdb_info['episode_count']), $runtime)
## test if average mini-series runtime is reasonable before using it,
## apply only to a runtime > 60 minutes, and assume 9.x minutes is the minimum (e.g. robot chicken)
#if $show_obj.imdb_info['is_mini_series'] and 1 < $show_obj.imdb_info['episode_count'] \
and $runtime and 90 < $show_obj.imdb_info['runtimes']:
#set $average_runtime = $show_obj.imdb_info['runtimes']/$show_obj.imdb_info['episode_count']
if 9 < $average_runtime:
#set $runtime = '%s (av %s?)' % ($runtime, int($average_runtime))
#end if
#end if
#end if

2
sickbeard/tv.py

@ -2981,7 +2981,7 @@ class TVShow(TVShowBase):
'title': '',
'year': '',
'akas': '',
'runtimes': self._runtime,
'runtimes': try_int(self._runtime, None),
'is_mini_series': False,
'episode_count': None,
'genres': '',

Loading…
Cancel
Save