Faster lookup of elements in our plex.db
This commit is contained in:
parent
24ebb38f74
commit
95b469efb5
1 changed files with 3 additions and 2 deletions
|
@ -431,9 +431,10 @@ def playlist_item_from_xml(xml_video_element, kodi_id=None, kodi_type=None):
|
|||
if kodi_id is not None:
|
||||
item.kodi_id = kodi_id
|
||||
item.kodi_type = kodi_type
|
||||
elif item.plex_id is not None and item.plex_type != v.PLEX_TYPE_CLIP:
|
||||
elif item.plex_type != v.PLEX_TYPE_CLIP:
|
||||
with PlexDB(lock=False) as plexdb:
|
||||
db_element = plexdb.item_by_id(item.plex_id)
|
||||
db_element = plexdb.item_by_id(item.plex_id,
|
||||
plex_type=item.plex_type)
|
||||
if db_element:
|
||||
item.kodi_id = db_element['kodi_id']
|
||||
item.kodi_type = db_element['kodi_type']
|
||||
|
|
Loading…
Reference in a new issue