diff --git a/resources/lib/library_sync/full_sync.py b/resources/lib/library_sync/full_sync.py index 7646ee03..c567687c 100644 --- a/resources/lib/library_sync/full_sync.py +++ b/resources/lib/library_sync/full_sync.py @@ -119,9 +119,8 @@ class FullSync(backgroundthread.KillableThread, common.libsync_mixin): if not self.install_sync_done: state.PATH_VERIFIED = False try: - iterator = PF.SectionItems( - section['id'], - {'type': v.PLEX_TYPE_NUMBER_FROM_PLEX_TYPE[self.plex_type]}) + iterator = PF.SectionItems(section['id'], + {'type': self.plex_type}) # Tell the processing thread about this new section queue_info = process_metadata.InitNewSection( self.context, diff --git a/resources/lib/library_sync/time.py b/resources/lib/library_sync/time.py index dd1442a3..c42965b9 100644 --- a/resources/lib/library_sync/time.py +++ b/resources/lib/library_sync/time.py @@ -47,9 +47,7 @@ def sync_pms_time(): continue library_id = section.attrib['key'] try: - iterator = PF.SectionItems( - library_id, - {'type': v.PLEX_TYPE_NUMBER_FROM_PLEX_TYPE[plex_type]}) + iterator = PF.SectionItems(library_id, {'type': plex_type}) for item in iterator: if item.get('viewCount'): # Don't want to mess with items that have playcount>0 diff --git a/resources/lib/plex_functions.py b/resources/lib/plex_functions.py index 88ead020..2000fd4c 100644 --- a/resources/lib/plex_functions.py +++ b/resources/lib/plex_functions.py @@ -589,6 +589,8 @@ class SectionItems(DownloadGen): Iterator object to get all items of a Plex library section """ def __init__(self, section_id, args=None): + if args and 'type' in args: + args['type'] = v.PLEX_TYPE_NUMBER_FROM_PLEX_TYPE[args['type']] super(SectionItems, self).__init__( '{server}/library/sections/%s/all' % section_id, args)