Move check for direct paths and context menu play
This commit is contained in:
parent
933bd44ad5
commit
40d670d002
1 changed files with 8 additions and 8 deletions
|
@ -185,12 +185,6 @@ class PlayqueueMonitor(Thread):
|
||||||
else:
|
else:
|
||||||
LOG.debug('Detected new Kodi element at position %s: %s ',
|
LOG.debug('Detected new Kodi element at position %s: %s ',
|
||||||
i, new_item)
|
i, new_item)
|
||||||
if playqueue.id is None and (not state.DIRECT_PATHS or
|
|
||||||
state.CONTEXT_MENU_PLAY):
|
|
||||||
# Only initialize if directly fired up using direct paths.
|
|
||||||
# Otherwise let default.py do its magic
|
|
||||||
LOG.debug('Not yet initiating playback')
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
if playqueue.id is None:
|
if playqueue.id is None:
|
||||||
PL.init_Plex_playlist(playqueue, kodi_item=new_item)
|
PL.init_Plex_playlist(playqueue, kodi_item=new_item)
|
||||||
|
@ -233,8 +227,14 @@ class PlayqueueMonitor(Thread):
|
||||||
for playqueue in PLAYQUEUES:
|
for playqueue in PLAYQUEUES:
|
||||||
kodi_pl = js.playlist_get_items(playqueue.playlistid)
|
kodi_pl = js.playlist_get_items(playqueue.playlistid)
|
||||||
if playqueue.old_kodi_pl != kodi_pl:
|
if playqueue.old_kodi_pl != kodi_pl:
|
||||||
# compare old and new playqueue
|
if playqueue.id is None and (not state.DIRECT_PATHS or
|
||||||
self._compare_playqueues(playqueue, kodi_pl)
|
state.CONTEXT_MENU_PLAY):
|
||||||
|
# Only initialize if directly fired up using direct
|
||||||
|
# paths. Otherwise let default.py do its magic
|
||||||
|
LOG.debug('Not yet initiating playback')
|
||||||
|
else:
|
||||||
|
# compare old and new playqueue
|
||||||
|
self._compare_playqueues(playqueue, kodi_pl)
|
||||||
playqueue.old_kodi_pl = list(kodi_pl)
|
playqueue.old_kodi_pl = list(kodi_pl)
|
||||||
sleep(200)
|
sleep(200)
|
||||||
LOG.info("----===## PlayqueueMonitor stopped ##===----")
|
LOG.info("----===## PlayqueueMonitor stopped ##===----")
|
||||||
|
|
Loading…
Add table
Reference in a new issue