Fix video library sometimes not updating
This commit is contained in:
parent
2ceb0cd7a2
commit
202d33d7c0
1 changed files with 4 additions and 10 deletions
|
@ -16,13 +16,7 @@ def update_kodi_library(video=True, music=True):
|
||||||
"""
|
"""
|
||||||
Updates the Kodi library and thus refreshes the Kodi views and widgets
|
Updates the Kodi library and thus refreshes the Kodi views and widgets
|
||||||
"""
|
"""
|
||||||
if xbmc.getCondVisibility('Container.Content(musicvideos)') or \
|
if video:
|
||||||
xbmc.getCondVisibility('Window.IsMedia'):
|
xbmc.executebuiltin('UpdateLibrary(video)')
|
||||||
# Prevent cursor from moving
|
if music:
|
||||||
xbmc.executebuiltin('Container.Refresh')
|
xbmc.executebuiltin('UpdateLibrary(music)')
|
||||||
else:
|
|
||||||
# Update widgets
|
|
||||||
if video:
|
|
||||||
xbmc.executebuiltin('UpdateLibrary(video)')
|
|
||||||
if music:
|
|
||||||
xbmc.executebuiltin('UpdateLibrary(music)')
|
|
||||||
|
|
Loading…
Reference in a new issue