From 4d9c845fd30a4d59832a0d74caa60bc43489f93d Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sun, 3 May 2015 18:08:07 +0200 Subject: [PATCH] show the additional resume dialog if launched from a widget --- resources/lib/PlaybackUtils.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/resources/lib/PlaybackUtils.py b/resources/lib/PlaybackUtils.py index 8c179949..b6851ddf 100644 --- a/resources/lib/PlaybackUtils.py +++ b/resources/lib/PlaybackUtils.py @@ -76,17 +76,19 @@ class PlaybackUtils(): WINDOW.setProperty(playurl+"deleteurl", "") WINDOW.setProperty(playurl+"deleteurl", deleteurl) - '''if seekTime != 0: - displayTime = str(datetime.timedelta(seconds=seekTime)) - display_list = [ self.language(30106) + ' ' + displayTime, self.language(30107)] - resumeScreen = xbmcgui.Dialog() - resume_result = resumeScreen.select(self.language(30105), display_list) - if resume_result == 0: - WINDOW.setProperty(playurl+"seektime", str(seekTime)) + #show the additional resume dialog if launched from a widget + if xbmc.getCondVisibility("Window.IsActive(home)"): + if seekTime != 0: + displayTime = str(datetime.timedelta(seconds=seekTime)) + display_list = [ self.language(30106) + ' ' + displayTime, self.language(30107)] + resumeScreen = xbmcgui.Dialog() + resume_result = resumeScreen.select(self.language(30105), display_list) + if resume_result == 0: + WINDOW.setProperty(playurl+"seektime", str(seekTime)) + else: + WINDOW.clearProperty(playurl+"seektime") else: WINDOW.clearProperty(playurl+"seektime") - else: - WINDOW.clearProperty(playurl+"seektime")''' if result.get("Type")=="Episode": WINDOW.setProperty(playurl+"refresh_id", result.get("SeriesId"))