diff --git a/resources/lib/library.py b/resources/lib/library.py index 34cde7ff..e7cf73de 100644 --- a/resources/lib/library.py +++ b/resources/lib/library.py @@ -376,6 +376,7 @@ class Library(threading.Thread): return False + Views().get_views() Views().get_nodes() return True diff --git a/resources/lib/views.py b/resources/lib/views.py index 6e120d95..3836f3c5 100644 --- a/resources/lib/views.py +++ b/resources/lib/views.py @@ -117,7 +117,6 @@ class Views(object): self.delete_playlist_by_id(view_id) self.delete_node_by_id(view_id) - self.get_views() def get_views(self): @@ -146,6 +145,14 @@ class Views(object): self.add_library(library) + with Database('emby') as embydb: + views = emby_db.EmbyDatabase(embydb.cursor).get_views() + + for view in views: + + if view[0] not in self.sync['SortedViews']: + self.remove_library(view[0]) + save_sync(self.sync) def get_nodes(self):