diff --git a/resources/lib/library_sync/sections.py b/resources/lib/library_sync/sections.py index 88fefcad..16979402 100644 --- a/resources/lib/library_sync/sections.py +++ b/resources/lib/library_sync/sections.py @@ -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 diff --git a/resources/lib/playlists/db.py b/resources/lib/playlists/db.py index 96074fad..5cbd386f 100644 --- a/resources/lib/playlists/db.py +++ b/resources/lib/playlists/db.py @@ -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):