diff --git a/CHANGES.md b/CHANGES.md index ab91ee49..37e36ab3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.16.0 (2018-04-26 17:10:00 UTC) +### 0.16.1 (2018-05-01 13:20:00 UTC) + +* Fix IMDb links to older shows on displayshow and editshow page + + +### 0.16.0 (2018-04-26 17:10:00 UTC) * Change search show result 'exists in db' text into a link to display show page * Change increase namecache size and fix deleting items from it when at capacity diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index e1180f70..28e828a9 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1719,6 +1719,14 @@ class Home(MainHandler): return json.dumps({'success': t.respond()}) + @staticmethod + def fix_imdb_id(obj): + try: + obj.ids[sickbeard.indexers.indexer_config.INDEXER_IMDB]['id'] = '%07d' % obj.ids[ + sickbeard.indexers.indexer_config.INDEXER_IMDB]['id'] + except (StandardError, Exception): + pass + def displayShow(self, show=None): if show is None: @@ -1794,6 +1802,7 @@ class Home(MainHandler): {'title': 'Download Subtitles', 'path': 'home/subtitleShow?show=%d' % showObj.indexerid}) t.show = showObj + self.fix_imdb_id(t.show) with BS4Parser('%s' % showObj.overview, features=['html5lib', 'permissive']) as soup: try: soup.a.replace_with(soup.new_tag('')) @@ -2224,6 +2233,7 @@ class Home(MainHandler): with showObj.lock: t.show = showObj + self.fix_imdb_id(t.show) t.show_has_scene_map = showObj.indexerid in sickbeard.scene_exceptions.xem_ids_list[showObj.indexer] # noinspection PyTypeChecker