From e6a5b1c157d95e7125597ba35b180134638dff02 Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 7 Dec 2017 17:25:48 +0100 Subject: [PATCH] Move Kodi playback info to state.py --- resources/lib/player.py | 3 ++- resources/lib/state.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/lib/player.py b/resources/lib/player.py index 34a6e805..52e6e515 100644 --- a/resources/lib/player.py +++ b/resources/lib/player.py @@ -22,7 +22,8 @@ log = logging.getLogger("PLEX."+__name__) class Player(xbmc.Player): - playStats = {} + played_info = state.PLAYED_INFO + playStats = state.PLAYER_STATES currentFile = None def __init__(self): diff --git a/resources/lib/state.py b/resources/lib/state.py index 97da71c9..26ff403c 100644 --- a/resources/lib/state.py +++ b/resources/lib/state.py @@ -74,3 +74,7 @@ PLEX_USER_ID = None # Token passed along, e.g. if playback initiated by Plex Companion. Might be # another user playing something! Token identifies user PLEX_TRANSIENT_TOKEN = None + +# Kodi player states +PLAYER_STATES = {} +PLAYED_INFO = {}