mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 05:36:12 +00:00
Add refresh for videonodes
To fix home video nodes.
This commit is contained in:
parent
55d841b0b3
commit
1d6556fb44
2 changed files with 22 additions and 14 deletions
|
@ -140,15 +140,7 @@ def reset():
|
|||
deletePlaylists()
|
||||
|
||||
# Clean up the video nodes
|
||||
import shutil
|
||||
path = xbmc.translatePath("special://profile/library/video/").decode('utf-8')
|
||||
dirs, files = xbmcvfs.listdir(path)
|
||||
for dir in dirs:
|
||||
if dir.decode('utf-8').startswith('Emby'):
|
||||
shutil.rmtree("%s%s" % (path, dir.decode('utf-8')))
|
||||
for file in files:
|
||||
if file.decode('utf-8').startswith('emby'):
|
||||
xbmcvfs.delete("%s%s" % (path, file.decode('utf-8')))
|
||||
deleteNodes()
|
||||
|
||||
# Wipe the kodi databases
|
||||
logMsg("EMBY", "Resetting the Kodi video database.")
|
||||
|
@ -502,4 +494,17 @@ def deletePlaylists():
|
|||
dirs, files = xbmcvfs.listdir(path)
|
||||
for file in files:
|
||||
if file.decode('utf-8').startswith('Emby'):
|
||||
xbmcvfs.delete("%s%s" % (path, file))
|
||||
xbmcvfs.delete("%s%s" % (path, file))
|
||||
|
||||
def deleteNodes():
|
||||
|
||||
# Clean up video nodes
|
||||
import shutil
|
||||
path = xbmc.translatePath("special://profile/library/video/").decode('utf-8')
|
||||
dirs, files = xbmcvfs.listdir(path)
|
||||
for dir in dirs:
|
||||
if dir.decode('utf-8').startswith('Emby'):
|
||||
shutil.rmtree("%s%s" % (path, dir.decode('utf-8')))
|
||||
for file in files:
|
||||
if file.decode('utf-8').startswith('emby'):
|
||||
xbmcvfs.delete("%s%s" % (path, file.decode('utf-8')))
|
Loading…
Add table
Add a link
Reference in a new issue