diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 3370f2dd..7ffdc36b 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -174,6 +174,12 @@ def show_listing(xml, plex_type=None, section_id=None, synched=True, key=None, # Initialization widgets.PLEX_TYPE = plex_type widgets.SYNCHED = synched + if plex_type == v.PLEX_TYPE_SHOW and key and 'onDeck' in key: + widgets.APPEND_SHOW_TITLE = utils.settings('OnDeckTvAppendShow') == 'true' + widgets.APPEND_SXXEXX = utils.settings('OnDeckTvAppendSeason') == 'true' + if plex_type == v.PLEX_TYPE_SHOW and key and 'recentlyAdded' in key: + widgets.APPEND_SHOW_TITLE = utils.settings('RecentTvAppendShow') == 'true' + widgets.APPEND_SXXEXX = utils.settings('RecentTvAppendSeason') == 'true' if content_type and xml[0].tag == 'Playlist': # Certain views mix playlist types audio and video for entry in reversed(xml): diff --git a/resources/lib/widgets.py b/resources/lib/widgets.py index 7ca6ceb8..5ee9facb 100644 --- a/resources/lib/widgets.py +++ b/resources/lib/widgets.py @@ -51,7 +51,7 @@ def process_method_on_list(method_to_run, items): pool.close() pool.join() else: - all_items = [method_to_run(items) for item in items] + all_items = [method_to_run(item) for item in items] all_items = filter(None, all_items) return all_items @@ -210,9 +210,10 @@ def _generate_content(xml_element): # Prefix to the episode's title/label if season_no is not None and episode_no is not None: if APPEND_SXXEXX is True: - item['label'] = "S%.2dE%.2d - %s" % (season_no, episode_no, item['label']) + item['title'] = "S%.2dE%.2d - %s" % (season_no, episode_no, item['title']) if APPEND_SHOW_TITLE is True: - item['label'] = "%s - %s " % (tvshowtitle, item['label']) + item['title'] = "%s - %s " % (tvshowtitle, item['title']) + item['label'] = item['title'] # Determine the path for this item key = api.path_and_plex_id()