mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-10 19:35:07 +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
|
@ -4,6 +4,7 @@ from exceptions import LibraryException
|
|||
from utils import addon_id
|
||||
from utils import window
|
||||
from utils import settings
|
||||
from utils import kodi_version
|
||||
from utils import dialog
|
||||
from utils import find
|
||||
from utils import event
|
||||
|
|
|
@ -408,7 +408,7 @@ class PlayUtils(object):
|
|||
Since Emby returns all possible tracks together, sort them.
|
||||
IsTextSubtitleStream if true, is available to download from server.
|
||||
'''
|
||||
if not source['MediaStreams']:
|
||||
if not settings('enableExternalSubs.bool') or not source['MediaStreams']:
|
||||
return
|
||||
|
||||
subs = []
|
||||
|
|
|
@ -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