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,8 +57,13 @@ 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:
js.activate_window('videos', xbmc.executebuiltin("Dialog.Close(all, true)")
'videodb://tvshows/titles/%s' % show_id) 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: else:
LOG.error('Could not find tv show id for %s', item) LOG.error('Could not find tv show id for %s', item)
if resolve: if resolve: