Merge pull request #456 from mcarlton00/refresh-boxsets-fix

Fix refresh boxsets function
This commit is contained in:
Odd Stråbø 2020-12-29 10:25:40 +01:00 committed by GitHub
commit 294a840155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,7 +215,10 @@ class FullSync(object):
if library_id.startswith('Boxsets:'): if library_id.startswith('Boxsets:'):
boxset_library = {} boxset_library = {}
libraries = self.get_libraries(library_id.split('Boxsets:')[1] if len(library_id) > len('Boxsets:') else None) if library_id and library_id == 'Boxsets:Refresh':
libraries = self.get_libraries()
else:
libraries = self.get_libraries(library_id.split('Boxsets:')[1])
for entry in libraries: for entry in libraries:
if entry[2] == 'boxsets': if entry[2] == 'boxsets':
boxset_library = {'Id': entry[0], 'Name': entry[1]} boxset_library = {'Id': entry[0], 'Name': entry[1]}
@ -501,7 +504,7 @@ class FullSync(object):
obj = Movies(self.server, jellyfindb, videodb, self.direct_path, library) obj = Movies(self.server, jellyfindb, videodb, self.direct_path, library)
obj.boxsets_reset() obj.boxsets_reset()
self.boxsets(None) self.boxsets(library)
@progress(translate(33144)) @progress(translate(33144))
def remove_library(self, library_id, dialog): def remove_library(self, library_id, dialog):