mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Get specific library vs list of libraries
This commit is contained in:
parent
ce111cfb61
commit
8517597262
1 changed files with 8 additions and 8 deletions
|
@ -82,7 +82,7 @@ class FullSync(object):
|
|||
for selected in libraries:
|
||||
|
||||
if selected not in [x.replace('Mixed:', "") for x in self.sync['Libraries']]:
|
||||
library = self.get_libraries(selected)
|
||||
library = self.get_library(selected)
|
||||
|
||||
if library:
|
||||
|
||||
|
@ -100,12 +100,12 @@ class FullSync(object):
|
|||
if not xmls.advanced_settings() and self.sync['Libraries']:
|
||||
self.start()
|
||||
|
||||
def get_libraries(self, library_id=None):
|
||||
|
||||
def get_libraries(self):
|
||||
with Database('jellyfin') as jellyfindb:
|
||||
if library_id is None:
|
||||
return jellyfin_db.JellyfinDatabase(jellyfindb.cursor).get_views()
|
||||
else:
|
||||
|
||||
def get_library(self, library_id):
|
||||
with Database('jellyfin') as jellyfindb:
|
||||
return jellyfin_db.JellyfinDatabase(jellyfindb.cursor).get_view(library_id)
|
||||
|
||||
def mapping(self):
|
||||
|
@ -223,7 +223,7 @@ class FullSync(object):
|
|||
if not sync_id or sync_id == 'Refresh':
|
||||
libraries = self.get_libraries()
|
||||
else:
|
||||
libraries = self.get_libraries(sync_id)
|
||||
libraries = [self.get_library(sync_id)]
|
||||
|
||||
for entry in libraries:
|
||||
if entry[2] == 'boxsets':
|
||||
|
|
Loading…
Reference in a new issue