Fixup
This commit is contained in:
parent
b586ac09c4
commit
7616d6dc26
1 changed files with 4 additions and 6 deletions
|
@ -223,12 +223,8 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
|
|
||||||
path = 'plugin://plugin.video.plexkodiconnect?mode=playstrm&plex_id=%s' % params['plex_id']
|
path = 'plugin://plugin.video.plexkodiconnect?mode=playstrm&plex_id=%s' % params['plex_id']
|
||||||
xbmc.log('PLEX.webservice: sending %s' % path, xbmc.LOGDEBUG)
|
|
||||||
self.wfile.write(bytes(path.encode('utf-8')))
|
self.wfile.write(bytes(path.encode('utf-8')))
|
||||||
if params['plex_id'] not in self.server.pending:
|
if params['plex_id'] not in self.server.pending:
|
||||||
xbmc.log('PLEX.webservice: path %s params %s' % (self.path, params),
|
|
||||||
xbmc.LOGDEBUG)
|
|
||||||
|
|
||||||
self.server.pending.append(params['plex_id'])
|
self.server.pending.append(params['plex_id'])
|
||||||
self.server.queue.put(params)
|
self.server.queue.put(params)
|
||||||
if not len(self.server.threads):
|
if not len(self.server.threads):
|
||||||
|
@ -367,7 +363,9 @@ class QueuePlay(backgroundthread.KillableThread):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
params = self.server.queue.get(block=False)
|
# We cannot know when Kodi will send the last item, e.g.
|
||||||
|
# when playing an entire folder
|
||||||
|
params = self.server.queue.get(timeout=0.01)
|
||||||
except Queue.Empty:
|
except Queue.Empty:
|
||||||
LOG.debug('Wrapping up')
|
LOG.debug('Wrapping up')
|
||||||
if xbmc.getCondVisibility('VideoPlayer.Content(livetv)'):
|
if xbmc.getCondVisibility('VideoPlayer.Content(livetv)'):
|
||||||
|
@ -435,8 +433,8 @@ class QueuePlay(backgroundthread.KillableThread):
|
||||||
# "task_done() called too many times"
|
# "task_done() called too many times"
|
||||||
pass
|
pass
|
||||||
if abort:
|
if abort:
|
||||||
playqueue.clear()
|
|
||||||
xbmc.Player().stop()
|
xbmc.Player().stop()
|
||||||
|
playqueue.clear()
|
||||||
self.server.queue.queue.clear()
|
self.server.queue.queue.clear()
|
||||||
if play_folder:
|
if play_folder:
|
||||||
xbmc.executebuiltin('Dialog.Close(busydialognocancel)')
|
xbmc.executebuiltin('Dialog.Close(busydialognocancel)')
|
||||||
|
|
Loading…
Reference in a new issue