Rewire plex.playlist.audio
This commit is contained in:
parent
439857a9ce
commit
797a58a3d5
4 changed files with 7 additions and 4 deletions
|
@ -59,6 +59,9 @@ class PlayState(object):
|
|||
self.resume_playback = None
|
||||
# Don't ask user whether to resume but immediatly resume
|
||||
self.autoplay = False
|
||||
# Are we using the Kodi audio playlist (=True, e.g. for videos when
|
||||
# starting from a widget!) or video playlist (=False)?
|
||||
self.audioplaylist = None
|
||||
# Was the playback initiated by the user using the Kodi context menu?
|
||||
self.context_menu_play = False
|
||||
# Set by context menu - shall we force-transcode the next playing item?
|
||||
|
|
|
@ -184,9 +184,9 @@ class KodiMonitor(xbmc.Monitor):
|
|||
'''
|
||||
if data['position'] == 0:
|
||||
if data['playlistid'] == 0:
|
||||
utils.window('plex.playlist.audio', value='true')
|
||||
app.PLAYSTATE.audioplaylist = True
|
||||
else:
|
||||
utils.window('plex.playlist.audio', clear=True)
|
||||
app.PLAYSTATE.audioplaylist = False
|
||||
self.playlistid = data['playlistid']
|
||||
if utils.window('plex.playlist.start') and data['position'] == int(utils.window('plex.playlist.start')) + 1:
|
||||
LOG.info('Playlist ready')
|
||||
|
|
|
@ -52,7 +52,7 @@ class PlayStrm(object):
|
|||
self.transcode = params.get('transcode')
|
||||
if self.transcode is None:
|
||||
self.transcode = utils.settings('playFromTranscode.bool') if utils.settings('playFromStream.bool') else None
|
||||
if utils.window('plex.playlist.audio'):
|
||||
if app.PLAYSTATE.audioplaylist:
|
||||
LOG.debug('Audio playlist detected')
|
||||
self.playqueue = PQ.get_playqueue_from_type(v.KODI_TYPE_AUDIO)
|
||||
else:
|
||||
|
|
|
@ -330,7 +330,7 @@ class QueuePlay(backgroundthread.KillableThread):
|
|||
|
||||
utils.window('plex.playlist.ready', clear=True)
|
||||
utils.window('plex.playlist.start', clear=True)
|
||||
utils.window('plex.playlist.audio', clear=True)
|
||||
app.PLAYSTATE.audioplaylist = None
|
||||
self.server.threads.remove(self)
|
||||
self.server.pending = []
|
||||
LOG.info('##===---- QueuePlay Stopped ----===##')
|
||||
|
|
Loading…
Reference in a new issue