mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Add delay to check for valid DLNA session
This commit is contained in:
parent
abe75c9744
commit
b3f43f956e
1 changed files with 8 additions and 0 deletions
|
@ -71,6 +71,14 @@ class ActivityHandler(object):
|
|||
def on_start(self):
|
||||
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'])))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue