Fix browsing to show from info dialog

This commit is contained in:
croneter 2019-01-17 20:33:46 +01:00
parent 5dd346b657
commit 5f79e944ab

View file

@ -4,12 +4,15 @@ from __future__ import absolute_import, division, unicode_literals
from logging import getLogger from logging import getLogger
from urlparse import parse_qsl from urlparse import parse_qsl
import xbmc
from .kodi_db import KodiVideoDB from .kodi_db import KodiVideoDB
from . import playback from . import playback
from . import context_entry from . import context_entry
from . import json_rpc as js from . import json_rpc as js
from . import pickler from . import pickler
from . import backgroundthread from . import backgroundthread
from . import variables as v
############################################################################### ###############################################################################
@ -54,6 +57,11 @@ class PlaybackTask(backgroundthread.Task):
with KodiVideoDB(lock=False) as kodidb: with KodiVideoDB(lock=False) as kodidb:
show_id = kodidb.show_id_from_path(params.get('path')) show_id = kodidb.show_id_from_path(params.get('path'))
if show_id: if 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', js.activate_window('videos',
'videodb://tvshows/titles/%s' % show_id) 'videodb://tvshows/titles/%s' % show_id)
else: else: