mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Fix update library
Plug in remove library percentage
This commit is contained in:
parent
838ce36f44
commit
5ab2a7db5c
2 changed files with 15 additions and 3 deletions
|
@ -40,7 +40,7 @@ class FullSync(object):
|
|||
libraries = library_id.split(',')
|
||||
|
||||
for selected in libraries:
|
||||
if selected not in [x.replace('Mixed:', "") for x in self.sync['Whitelist']]:
|
||||
if selected not in [x.replace('Mixed:', "") for x in self.sync['Libraries']]:
|
||||
library = self.get_libraries(selected)
|
||||
|
||||
if library and library[1] == 'mixed':
|
||||
|
@ -51,6 +51,7 @@ class FullSync(object):
|
|||
self.mapping()
|
||||
|
||||
xmls.sources()
|
||||
|
||||
if not xmls.advanced_settings():
|
||||
self.start()
|
||||
|
||||
|
@ -189,9 +190,12 @@ class FullSync(object):
|
|||
|
||||
except Exception as error:
|
||||
|
||||
dialog("ok", heading="{emby}", line1=_(33119))
|
||||
if not 'Failed to validate path' in error:
|
||||
|
||||
dialog("ok", heading="{emby}", line1=_(33119))
|
||||
LOG.error("full sync exited unexpectedly")
|
||||
|
||||
save_sync(self.sync)
|
||||
LOG.error("full sync exited unexpectedly")
|
||||
|
||||
raise
|
||||
|
||||
|
|
|
@ -380,6 +380,8 @@ class Library(threading.Thread):
|
|||
settings('MusicRescan.bool', False)
|
||||
|
||||
if items:
|
||||
count = 0
|
||||
|
||||
with self.music_database_lock if media == 'music' else self.database_lock:
|
||||
with Database(media) as kodidb:
|
||||
|
||||
|
@ -391,16 +393,22 @@ class Library(threading.Thread):
|
|||
|
||||
for item in movies:
|
||||
obj(item[0])
|
||||
dialog.update(int((float(count) / float(len(items))*100)), heading="%s: %s" % (_('addon_name'), library[0]))
|
||||
count += 1
|
||||
|
||||
obj = MEDIA['Series'](self.server, embydb, kodidb, self.direct_path)['Remove']
|
||||
|
||||
for item in tvshows:
|
||||
obj(item[0])
|
||||
dialog.update(int((float(count) / float(len(items))*100)), heading="%s: %s" % (_('addon_name'), library[0]))
|
||||
count += 1
|
||||
else:
|
||||
obj = MEDIA[items[0][1]](self.server, embydb, kodidb, self.direct_path)['Remove']
|
||||
|
||||
for item in items:
|
||||
obj(item[0])
|
||||
dialog.update(int((float(count) / float(len(items))*100)), heading="%s: %s" % (_('addon_name'), library[0]))
|
||||
count += 1
|
||||
|
||||
sync = get_sync()
|
||||
|
||||
|
|
Loading…
Reference in a new issue