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 = ( WINDOW_PROPERTIES = (
"plex_online", "plex_serverStatus", "plex_onWake", "plex_kodiScan", "plex_online", "plex_serverStatus", "plex_shouldStop", "plex_dbScan",
"plex_shouldStop", "plex_dbScan", "plex_initialScan", "plex_initialScan", "plex_customplayqueue", "plex_playbackProps",
"plex_customplayqueue", "plex_playbackProps", "pms_token", "plex_token", "pms_token", "plex_token", "pms_server", "plex_machineIdentifier",
"pms_server", "plex_machineIdentifier", "plex_servername", "plex_servername", "plex_authenticated", "PlexUserImage", "useDirectPaths",
"plex_authenticated", "PlexUserImage", "useDirectPaths", "countError", "countError", "countUnauthorized", "plex_restricteduser",
"countUnauthorized", "plex_restricteduser", "plex_allows_mediaDeletion", "plex_allows_mediaDeletion", "plex_command", "plex_result",
"plex_command", "plex_result", "plex_force_transcode_pix" "plex_force_transcode_pix"
) )

View file

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