Pass plex_type with section

This commit is contained in:
croneter 2018-11-09 09:10:22 +01:00
parent 5b85b2b71a
commit 76728d7319
2 changed files with 6 additions and 3 deletions

View file

@ -107,7 +107,8 @@ class FullSync(common.libsync_mixin):
self.context, self.context,
utils.cast(int, iterator.get('totalSize', 0)), utils.cast(int, iterator.get('totalSize', 0)),
iterator.get('librarySectionTitle'), iterator.get('librarySectionTitle'),
section['section_id']) section['section_id'],
self.plex_type)
self.queue.put(queue_info) self.queue.put(queue_info)
with PlexDB() as self.plexdb: with PlexDB() as self.plexdb:
for xml_item in iterator: for xml_item in iterator:
@ -133,7 +134,8 @@ class FullSync(common.libsync_mixin):
self.context, self.context,
utils.cast(int, iterator.get('totalSize', 0)), utils.cast(int, iterator.get('totalSize', 0)),
iterator.get('librarySectionTitle'), iterator.get('librarySectionTitle'),
section['section_id']) section['section_id'],
self.plex_type)
self.queue.put(queue_info) self.queue.put(queue_info)
# Ensure that the DB connection is closed to commit the # Ensure that the DB connection is closed to commit the
# changes above - avoids "Item not yet synced" error # changes above - avoids "Item not yet synced" error

View file

@ -21,11 +21,12 @@ class InitNewSection(object):
context: itemtypes.Movie, itemtypes.Episode, etc. context: itemtypes.Movie, itemtypes.Episode, etc.
""" """
def __init__(self, context, total_number_of_items, section_name, def __init__(self, context, total_number_of_items, section_name,
section_id): section_id, plex_type):
self.context = context self.context = context
self.total = total_number_of_items self.total = total_number_of_items
self.name = section_name self.name = section_name
self.id = section_id self.id = section_id
self.plex_type = plex_type
class ProcessMetadata(backgroundthread.KillableThread, common.libsync_mixin): class ProcessMetadata(backgroundthread.KillableThread, common.libsync_mixin):