From ce622654ccc4009c4d506bff1725d58cd8e7dc83 Mon Sep 17 00:00:00 2001 From: sfaulds Date: Tue, 15 Aug 2017 20:19:28 +1000 Subject: [PATCH] add epp number/name and last epp number to play next epp dialog --- addon.xml | 2 +- service.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addon.xml b/addon.xml index 92ef602..883c69a 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/service.py b/service.py index 510204d..912af8f 100644 --- a/service.py +++ b/service.py @@ -152,8 +152,9 @@ def promptForStopActions(item_id, current_possition): item_list = items_result.get("Items", []) for item in item_list: index = item.get("IndexNumber", -1) - if index > item_index: # find the next episode in the season - resp = xbmcgui.Dialog().yesno(i18n("play_next_title"), i18n("play_next_question"), autoclose=10000) + if index == item_index + 1: # find the very next episode in the season + next_epp_name = str(index) + " of " + str(item_list[-1].get("IndexNumber", -1)) + " - " + item.get("Name", "n/a") + resp = xbmcgui.Dialog().yesno(i18n("play_next_title"), i18n("play_next_question"), next_epp_name, autoclose=10000) if resp: next_item_id = item.get("Id") log.debug("Playing Next Episode: %s" % next_item_id)