mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix boxset syncing
This commit is contained in:
parent
eca9630918
commit
4178f0a362
1 changed files with 14 additions and 7 deletions
|
@ -214,10 +214,17 @@ class FullSync(object):
|
||||||
try:
|
try:
|
||||||
if library_id.startswith('Boxsets:'):
|
if library_id.startswith('Boxsets:'):
|
||||||
|
|
||||||
if library_id.endswith('Refresh'):
|
libraries = self.get_libraries(library_id.split('Boxsets:')[1] if len(library_id) > len('Boxsets:') else None)
|
||||||
self.refresh_boxsets()
|
for entry in libraries:
|
||||||
else:
|
if entry[2] == 'boxsets':
|
||||||
self.boxsets(library_id.split('Boxsets:')[1] if len(library_id) > len('Boxsets:') else None)
|
boxset_library = {'Id': entry[0], 'Name': entry[1]}
|
||||||
|
break
|
||||||
|
|
||||||
|
if boxset_library:
|
||||||
|
if library_id.endswith('Refresh'):
|
||||||
|
self.refresh_boxsets(boxset_library)
|
||||||
|
else:
|
||||||
|
self.boxsets(boxset_library)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -461,11 +468,11 @@ class FullSync(object):
|
||||||
obj.remove(x[0])
|
obj.remove(x[0])
|
||||||
|
|
||||||
@progress(translate(33018))
|
@progress(translate(33018))
|
||||||
def boxsets(self, library_id=None, dialog=None):
|
def boxsets(self, library, dialog=None):
|
||||||
|
|
||||||
''' Process all boxsets.
|
''' Process all boxsets.
|
||||||
'''
|
'''
|
||||||
for items in server.get_items(library_id, "BoxSet", False, self.sync['RestorePoint'].get('params')):
|
for items in server.get_items(library['Id'], "BoxSet", False, self.sync['RestorePoint'].get('params')):
|
||||||
|
|
||||||
with self.video_database_locks() as (videodb, jellyfindb):
|
with self.video_database_locks() as (videodb, jellyfindb):
|
||||||
obj = Movies(self.server, jellyfindb, videodb, self.direct_path, library)
|
obj = Movies(self.server, jellyfindb, videodb, self.direct_path, library)
|
||||||
|
@ -480,7 +487,7 @@ class FullSync(object):
|
||||||
message=boxset['Name'])
|
message=boxset['Name'])
|
||||||
obj.boxset(boxset)
|
obj.boxset(boxset)
|
||||||
|
|
||||||
def refresh_boxsets(self):
|
def refresh_boxsets(self, library):
|
||||||
|
|
||||||
''' Delete all exisitng boxsets and re-add.
|
''' Delete all exisitng boxsets and re-add.
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue