Fix activity resume after buffering

This commit is contained in:
JonnyWong16 2018-12-01 15:17:33 -08:00
parent ac259214f7
commit a749b71f7f

View file

@ -266,6 +266,7 @@ class ActivityHandler(object):
last_rating_key = str(db_session['rating_key']) last_rating_key = str(db_session['rating_key'])
last_live_uuid = db_session['live_uuid'] last_live_uuid = db_session['live_uuid']
last_transcode_key = db_session['transcode_key'].split('/')[-1] last_transcode_key = db_session['transcode_key'].split('/')[-1]
last_paused = db_session['last_paused']
# Make sure the same item is being played # Make sure the same item is being played
if this_rating_key == last_rating_key or this_live_uuid == last_live_uuid: if this_rating_key == last_rating_key or this_live_uuid == last_live_uuid:
@ -280,7 +281,7 @@ class ActivityHandler(object):
if this_state != last_state: if this_state != last_state:
if this_state == 'paused': if this_state == 'paused':
self.on_pause() self.on_pause()
elif last_state == 'paused' and this_state == 'playing': elif last_paused and this_state == 'playing':
self.on_resume() self.on_resume()
elif this_state == 'stopped': elif this_state == 'stopped':
self.on_stop() self.on_stop()