mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-24 17:01:39 +00:00
Fix update library
Only do the compare when user selects update library, also add a restart service option in the add-on settings > advanced
This commit is contained in:
parent
1174c685e9
commit
66822b6d0a
6 changed files with 28 additions and 11 deletions
|
@ -87,6 +87,8 @@ class Events(object):
|
|||
browse(params.get('type'), params.get('id'), params.get('folder'), server)
|
||||
elif mode == 'synclib':
|
||||
event('SyncLibrary', {'Id': params.get('id')})
|
||||
elif mode == 'updatelib':
|
||||
event('SyncLibrary', {'Id': params.get('id'), 'Update': True})
|
||||
elif mode == 'repairlib':
|
||||
event('RepairLibrary', {'Id': params.get('id')})
|
||||
elif mode == 'removelib':
|
||||
|
@ -117,6 +119,8 @@ class Events(object):
|
|||
get_themes()
|
||||
elif mode == 'backup':
|
||||
backup()
|
||||
elif mode == 'restartservice':
|
||||
window('emby.restart.bool', True)
|
||||
else:
|
||||
listing()
|
||||
|
||||
|
@ -150,7 +154,7 @@ def listing():
|
|||
|
||||
if view_id and node in ('movies', 'tvshows', 'musicvideos', 'music') and view_id in whitelist:
|
||||
|
||||
context.append((_(33136), "RunPlugin(plugin://plugin.video.emby/?mode=synclib&id=%s)" % view_id))
|
||||
context.append((_(33136), "RunPlugin(plugin://plugin.video.emby/?mode=updatelib&id=%s)" % view_id))
|
||||
context.append((_(33132), "RunPlugin(plugin://plugin.video.emby/?mode=repairlib&id=%s)" % view_id))
|
||||
context.append((_(33133), "RunPlugin(plugin://plugin.video.emby/?mode=removelib&id=%s)" % view_id))
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ class Service(xbmc.Monitor):
|
|||
if not data.get('Id'):
|
||||
return
|
||||
|
||||
self.library_thread.add_library(data['Id'])
|
||||
self.library_thread.add_library(data['Id'], data.get('Update', False))
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
elif method == 'RepairLibrary':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue