Remove obsolete window properties

This commit is contained in:
Croneter 2018-04-09 07:21:47 +02:00
parent ec5dff4a8d
commit d65b8ec0c0
2 changed files with 11 additions and 22 deletions

View file

@ -28,13 +28,13 @@ LOG = getLogger("PLEX." + __name__)
WINDOW_PROPERTIES = (
"plex_online", "plex_serverStatus", "plex_onWake", "plex_kodiScan",
"plex_shouldStop", "plex_dbScan", "plex_initialScan",
"plex_customplayqueue", "plex_playbackProps", "pms_token", "plex_token",
"pms_server", "plex_machineIdentifier", "plex_servername",
"plex_authenticated", "PlexUserImage", "useDirectPaths", "countError",
"countUnauthorized", "plex_restricteduser", "plex_allows_mediaDeletion",
"plex_command", "plex_result", "plex_force_transcode_pix"
"plex_online", "plex_serverStatus", "plex_shouldStop", "plex_dbScan",
"plex_initialScan", "plex_customplayqueue", "plex_playbackProps",
"pms_token", "plex_token", "pms_server", "plex_machineIdentifier",
"plex_servername", "plex_authenticated", "PlexUserImage", "useDirectPaths",
"countError", "countUnauthorized", "plex_restricteduser",
"plex_allows_mediaDeletion", "plex_command", "plex_result",
"plex_force_transcode_pix"
)

View file

@ -71,16 +71,12 @@ class KodiMonitor(Monitor):
Will be called when Kodi starts scanning the library
"""
LOG.debug("Kodi library scan %s running.", library)
if library == "video":
window('plex_kodiScan', value="true")
def onScanFinished(self, library):
"""
Will be called when Kodi finished scanning the library
"""
LOG.debug("Kodi library scan %s finished.", library)
if library == "video":
window('plex_kodiScan', clear=True)
def onSettingsChanged(self):
"""
@ -169,17 +165,11 @@ class KodiMonitor(Monitor):
LOG.error("Could not find itemid in plex database for a "
"video library update")
else:
# Stop from manually marking as watched unwatched, with
# actual playback.
if window('plex_skipWatched%s' % itemid) == "true":
# property is set in player.py
window('plex_skipWatched%s' % itemid, clear=True)
# notify the server
if playcount > 0:
scrobble(itemid, 'watched')
else:
# notify the server
if playcount > 0:
scrobble(itemid, 'watched')
else:
scrobble(itemid, 'unwatched')
scrobble(itemid, 'unwatched')
elif method == "VideoLibrary.OnRemove":
pass
elif method == "System.OnSleep":
@ -189,7 +179,6 @@ class KodiMonitor(Monitor):
elif method == "System.OnWake":
# Allow network to wake up
sleep(10000)
window('plex_onWake', value="true")
window('plex_online', value="false")
elif method == "GUI.OnScreensaverDeactivated":
if settings('dbSyncScreensaver') == "true":