mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Change remove library
This commit is contained in:
parent
b4ef64af5c
commit
b41721907c
1 changed files with 8 additions and 3 deletions
|
@ -14,7 +14,7 @@ import xbmcvfs
|
||||||
import downloader as server
|
import downloader as server
|
||||||
from database import Database, emby_db, get_sync, save_sync
|
from database import Database, emby_db, get_sync, save_sync
|
||||||
from objects.kodi import kodi
|
from objects.kodi import kodi
|
||||||
from helper import _, api, indent, write_xml, window
|
from helper import _, api, indent, write_xml, window, event
|
||||||
from emby import Emby
|
from emby import Emby
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
@ -146,12 +146,17 @@ class Views(object):
|
||||||
self.add_library(library)
|
self.add_library(library)
|
||||||
|
|
||||||
with Database('emby') as embydb:
|
with Database('emby') as embydb:
|
||||||
|
|
||||||
views = emby_db.EmbyDatabase(embydb.cursor).get_views()
|
views = emby_db.EmbyDatabase(embydb.cursor).get_views()
|
||||||
|
removed = []
|
||||||
|
|
||||||
for view in views:
|
for view in views:
|
||||||
|
|
||||||
if view[0] not in self.sync['SortedViews']:
|
if view[0] not in self.sync['SortedViews']:
|
||||||
self.remove_library(view[0])
|
removed.append(view[0])
|
||||||
|
|
||||||
|
if removed:
|
||||||
|
event('RemoveLibrary', {'Id': ','.join(removed)})
|
||||||
|
|
||||||
save_sync(self.sync)
|
save_sync(self.sync)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue