Fix browsing to show from info dialog
- Fixes #603 - Increases dependency on plugin.video.plexkodiconnect.tvshows to 2.0.8
This commit is contained in:
parent
9f0d0026e6
commit
5b5af1ceed
4 changed files with 7 additions and 24 deletions
|
@ -5,7 +5,7 @@
|
||||||
<import addon="script.module.requests" version="2.9.1" />
|
<import addon="script.module.requests" version="2.9.1" />
|
||||||
<import addon="script.module.defusedxml" version="0.5.0"/>
|
<import addon="script.module.defusedxml" version="0.5.0"/>
|
||||||
<import addon="plugin.video.plexkodiconnect.movies" version="2.0.7" />
|
<import addon="plugin.video.plexkodiconnect.movies" version="2.0.7" />
|
||||||
<import addon="plugin.video.plexkodiconnect.tvshows" version="2.0.7" />
|
<import addon="plugin.video.plexkodiconnect.tvshows" version="2.0.8" />
|
||||||
</requires>
|
</requires>
|
||||||
<extension point="xbmc.python.pluginsource" library="default.py">
|
<extension point="xbmc.python.pluginsource" library="default.py">
|
||||||
<provides>video audio image</provides>
|
<provides>video audio image</provides>
|
||||||
|
|
|
@ -89,6 +89,12 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
_playback_cleanup()
|
_playback_cleanup()
|
||||||
app.SYNC.suspend_sync = False
|
app.SYNC.suspend_sync = False
|
||||||
elif method == 'Playlist.OnAdd':
|
elif method == 'Playlist.OnAdd':
|
||||||
|
if 'item' in data and data['item'].get('type') == v.KODI_TYPE_SHOW:
|
||||||
|
# Hitting the "browse" button on tv show info dialog
|
||||||
|
# Hence show the tv show directly
|
||||||
|
xbmc.executebuiltin("Dialog.Close(all, true)")
|
||||||
|
js.activate_window('videos',
|
||||||
|
'videodb://tvshows/titles/%s/' % data['item']['id'])
|
||||||
with app.APP.lock_playqueues:
|
with app.APP.lock_playqueues:
|
||||||
self._playlist_onadd(data)
|
self._playlist_onadd(data)
|
||||||
elif method == 'Playlist.OnRemove':
|
elif method == 'Playlist.OnRemove':
|
||||||
|
|
|
@ -4,15 +4,11 @@ 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 . import playback
|
from . import playback
|
||||||
from . import context_entry
|
from . import context_entry
|
||||||
from . import json_rpc as js
|
|
||||||
from . import pickler
|
from . import pickler
|
||||||
from . import backgroundthread
|
from . import backgroundthread
|
||||||
from . import variables as v
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@ -52,22 +48,6 @@ class PlaybackTask(backgroundthread.Task):
|
||||||
playback.process_indirect(params['key'],
|
playback.process_indirect(params['key'],
|
||||||
params['offset'],
|
params['offset'],
|
||||||
resolve=resolve)
|
resolve=resolve)
|
||||||
elif mode == 'navigation':
|
|
||||||
# e.g. when plugin://...tvshows is called for entire season
|
|
||||||
with KodiVideoDB(lock=False) as kodidb:
|
|
||||||
show_id = kodidb.show_id_from_path(params.get('path'))
|
|
||||||
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',
|
|
||||||
'videodb://tvshows/titles/%s' % show_id)
|
|
||||||
else:
|
|
||||||
LOG.error('Could not find tv show id for %s', item)
|
|
||||||
if resolve:
|
|
||||||
pickler.pickle_me(pickler.Playback_Successful())
|
|
||||||
elif mode == 'context_menu':
|
elif mode == 'context_menu':
|
||||||
context_entry.ContextMenu(kodi_id=params.get('kodi_id'),
|
context_entry.ContextMenu(kodi_id=params.get('kodi_id'),
|
||||||
kodi_type=params.get('kodi_type'))
|
kodi_type=params.get('kodi_type'))
|
||||||
|
|
|
@ -403,9 +403,6 @@ class Service():
|
||||||
# Add-on path playback!
|
# Add-on path playback!
|
||||||
task = playback_starter.PlaybackTask(
|
task = playback_starter.PlaybackTask(
|
||||||
plex_command.replace('PLAY-', ''))
|
plex_command.replace('PLAY-', ''))
|
||||||
elif plex_command.startswith('NAVIGATE-'):
|
|
||||||
task = playback_starter.PlaybackTask(
|
|
||||||
plex_command.replace('NAVIGATE-', ''))
|
|
||||||
elif plex_command.startswith('CONTEXT_menu?'):
|
elif plex_command.startswith('CONTEXT_menu?'):
|
||||||
task = playback_starter.PlaybackTask(
|
task = playback_starter.PlaybackTask(
|
||||||
'dummy?mode=context_menu&%s'
|
'dummy?mode=context_menu&%s'
|
||||||
|
|
Loading…
Reference in a new issue