mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-08-20 22:41:35 +00:00
Add dynamic package support
And a few other fixes
This commit is contained in:
parent
77843c7f1d
commit
a18fa90f13
7 changed files with 56 additions and 95 deletions
|
@ -226,12 +226,13 @@ def write_xml(content, file):
|
|||
content = content.replace('?>', ' standalone="yes" ?>', 1)
|
||||
infile.write(content)
|
||||
|
||||
def delete_build():
|
||||
def delete_folder(path=None):
|
||||
|
||||
''' Delete objects from kodi cache
|
||||
'''
|
||||
LOG.debug("--[ delete objects ]")
|
||||
path = xbmc.translatePath('special://temp/emby/').decode('utf-8')
|
||||
LOG.debug("--[ delete folder ]")
|
||||
|
||||
path = path or xbmc.translatePath('special://temp/emby').decode('utf-8')
|
||||
dirs, files = xbmcvfs.listdir(path)
|
||||
|
||||
delete_recursive(path, dirs)
|
||||
|
@ -239,6 +240,9 @@ def delete_build():
|
|||
for file in files:
|
||||
xbmcvfs.delete(os.path.join(path, file.decode('utf-8')))
|
||||
|
||||
xbmcvfs.delete(path)
|
||||
LOG.info("deleted %s", path)
|
||||
|
||||
def delete_recursive(path, dirs):
|
||||
|
||||
''' Delete files and dirs recursively.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue