Fix turning generator into list
This commit is contained in:
parent
a060b1fcaa
commit
9bab18367c
2 changed files with 5 additions and 5 deletions
|
@ -58,7 +58,7 @@ def sync_from_pms():
|
|||
with PlexDB() as plexdb:
|
||||
# Backup old sections to delete them later, if needed (at the end
|
||||
# of this method, only unused sections will be left in old_sections)
|
||||
old_sections = [plexdb.section_ids()]
|
||||
old_sections = list(plexdb.section_ids())
|
||||
with kodidb.GetKodiDB('video') as kodi_db:
|
||||
for section in sections:
|
||||
_process_section(section,
|
||||
|
@ -67,13 +67,13 @@ def sync_from_pms():
|
|||
sorted_sections,
|
||||
old_sections,
|
||||
totalnodes)
|
||||
|
||||
LOG.info('old_sections: %s', old_sections)
|
||||
if old_sections:
|
||||
# Section has been deleted on the PMS
|
||||
delete_sections(old_sections)
|
||||
# update sections for all:
|
||||
with plexdb.PlexDB() as plexdb:
|
||||
SECTIONS = [plexdb.section_infos()]
|
||||
SECTIONS = list(plexdb.section_infos())
|
||||
utils.window('Plex.nodes.total', str(totalnodes))
|
||||
LOG.info("Finished processing library sections: %s", SECTIONS)
|
||||
return True
|
||||
|
|
|
@ -22,7 +22,7 @@ def plex_playlist_ids():
|
|||
Returns a list of all Plex ids of the playlists already in our DB
|
||||
"""
|
||||
with PlexDB() as plexdb:
|
||||
return [plexdb.playlist_ids()]
|
||||
return list(plexdb.playlist_ids())
|
||||
|
||||
|
||||
def kodi_playlist_paths():
|
||||
|
@ -30,7 +30,7 @@ def kodi_playlist_paths():
|
|||
Returns a list of all Kodi playlist paths of the playlists already synced
|
||||
"""
|
||||
with PlexDB() as plexdb:
|
||||
return [plexdb.kodi_playlist_paths()]
|
||||
return list(plexdb.kodi_playlist_paths())
|
||||
|
||||
|
||||
def update_playlist(playlist, delete=False):
|
||||
|
|
Loading…
Reference in a new issue