mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-21 23:42:45 +00:00
Remove library_check wrapper
This commit is contained in:
parent
0ee5b616a5
commit
eca9630918
9 changed files with 129 additions and 188 deletions
|
@ -21,6 +21,7 @@ from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcvfs
|
|||
from . import LazyLogger
|
||||
from .translate import translate
|
||||
|
||||
|
||||
#################################################################################################
|
||||
|
||||
LOG = LazyLogger(__name__)
|
||||
|
@ -535,3 +536,18 @@ def get_filesystem_encoding():
|
|||
enc = 'utf-8'
|
||||
|
||||
return enc
|
||||
|
||||
|
||||
def find_library(server, item):
|
||||
from database import get_sync
|
||||
|
||||
sync = get_sync()
|
||||
|
||||
ancestors = server.jellyfin.get_ancestors(item['Id'])
|
||||
for ancestor in ancestors:
|
||||
if ancestor['Id'] in sync['Whitelist']:
|
||||
LOG.info('Ancestor Found')
|
||||
return ancestor
|
||||
|
||||
LOG.error('No ancestor found, not syncing item with ID: {}'.format(item['Id']))
|
||||
return {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue