diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index d23aae7b..691cc634 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -4,12 +4,15 @@ from __future__ import absolute_import, division, unicode_literals from logging import getLogger from urlparse import parse_qsl +import xbmc + from .kodi_db import KodiVideoDB from . import playback from . import context_entry from . import json_rpc as js from . import pickler from . import backgroundthread +from . import variables as v ############################################################################### @@ -54,8 +57,13 @@ class PlaybackTask(backgroundthread.Task): with KodiVideoDB(lock=False) as kodidb: show_id = kodidb.show_id_from_path(params.get('path')) if show_id: - js.activate_window('videos', - 'videodb://tvshows/titles/%s' % show_id) + xbmc.executebuiltin("Dialog.Close(all, true)") + if v.KODIVERSION >= 18: + js.activate_window('videos', + 'videodb://tvshows/titles/%s/' % show_id) + else: + js.activate_window('videos', + 'videodb://tvshows/titles/%s' % show_id) else: LOG.error('Could not find tv show id for %s', item) if resolve: