From 88b581f756fe6c6c76fbaf7e293de86b8f541096 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 7 Apr 2016 16:13:02 +0200 Subject: [PATCH] Clear playlists and video nodes on user switch - And not on fullsync (widgets might brake) --- resources/lib/entrypoint.py | 4 ++++ resources/lib/librarysync.py | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index fccab5d1..ca5620e0 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -566,6 +566,10 @@ def switchPlexUser(): counter += 1 xbmc.sleep(50) + # First remove playlists + utils.deletePlaylists() + # Remove video nodes + utils.deleteNodes() # Log out currently signed in user: utils.window('emby_serverStatus', value="401") # Request lib sync to get user view data (e.g. watched/unwatched) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 5ca2e439..49045bbe 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -429,10 +429,7 @@ class LibrarySync(Thread): # Ensure that DBs exist if called for very first time self.initializeDBs() - # First remove playlists - utils.deletePlaylists() - # Remove video nodes - utils.deleteNodes() + # Set views. Abort if unsuccessful if not self.maintainViews(): xbmc.executebuiltin('InhibitIdleShutdown(false)')