Add delay to check for valid DLNA session

This commit is contained in:
JonnyWong16 2016-10-13 21:43:38 -07:00 committed by JonnyWong16
parent abe75c9744
commit b3f43f956e

View file

@ -72,6 +72,14 @@ class ActivityHandler(object):
if self.is_valid_session() and self.get_live_session():
session = self.get_live_session()
# Some DLNA clients create a new session temporarily when browsing the library
# Wait and get session again to make sure it is an actual session
if session['platform'] == 'DLNA':
time.sleep(1)
session = self.get_live_session()
if not session:
return
logger.debug(u"PlexPy ActivityHandler :: Session %s started by user %s with ratingKey %s."
% (str(session['session_key']), str(session['user_id']), str(session['rating_key'])))