Catch some errors if user mixes audio and video in Kodi playqueue
- Plex does not support mixed playqueues nor playlists
This commit is contained in:
parent
6d571a9bb5
commit
e1c9690b57
1 changed files with 13 additions and 3 deletions
|
@ -141,9 +141,14 @@ class PlayqueueMonitor(Thread):
|
||||||
del old[j], index[j]
|
del old[j], index[j]
|
||||||
break
|
break
|
||||||
elif identical:
|
elif identical:
|
||||||
LOG.debug('Detected playqueue item %s moved to position %s',
|
LOG.debug('Playqueue item %s moved to position %s',
|
||||||
i + j, i)
|
i + j, i)
|
||||||
|
try:
|
||||||
PL.move_playlist_item(playqueue, i + j, i)
|
PL.move_playlist_item(playqueue, i + j, i)
|
||||||
|
except PL.PlaylistError:
|
||||||
|
LOG.error('Could not modify playqueue positions')
|
||||||
|
LOG.error('This is likely caused by mixing audio and '
|
||||||
|
'video tracks in the Kodi playqueue')
|
||||||
del old[j], index[j]
|
del old[j], index[j]
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
@ -175,7 +180,12 @@ class PlayqueueMonitor(Thread):
|
||||||
# Kodi exit
|
# Kodi exit
|
||||||
return
|
return
|
||||||
LOG.debug('Detected deletion of playqueue element at pos %s', i)
|
LOG.debug('Detected deletion of playqueue element at pos %s', i)
|
||||||
|
try:
|
||||||
PL.delete_playlist_item_from_PMS(playqueue, i)
|
PL.delete_playlist_item_from_PMS(playqueue, i)
|
||||||
|
except PL.PlaylistError:
|
||||||
|
LOG.error('Could not delete PMS element from position %s', i)
|
||||||
|
LOG.error('This is likely caused by mixing audio and '
|
||||||
|
'video tracks in the Kodi playqueue')
|
||||||
LOG.debug('Done comparing playqueues')
|
LOG.debug('Done comparing playqueues')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
Loading…
Reference in a new issue