Merge pull request #547 from mcarlton00/external-subs

Fix external sub conflict
This commit is contained in:
Odd Stråbø 2021-07-18 11:20:22 +02:00 committed by GitHub
commit fe8bbba7b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -519,7 +519,7 @@ class PlayUtils(object):
LOG.info("[ subtitles/%s ] %s", index, url) LOG.info("[ subtitles/%s ] %s", index, url)
if 'Language' in stream: if 'Language' in stream:
filename = "Stream.%s.%s" % (stream['Language'], stream['Codec']) filename = "%s.%s.%s" % (source['Id'], stream['Language'], stream['Codec'])
try: try:
subs.append(self.download_external_subs(url, filename)) subs.append(self.download_external_subs(url, filename))

View file

@ -426,6 +426,8 @@ class Player(xbmc.Player):
dirs, files = xbmcvfs.listdir(path) dirs, files = xbmcvfs.listdir(path)
for file in files: for file in files:
# Only delete the cached files for the previous play session
if item['Id'] in file:
xbmcvfs.delete(os.path.join(path, file)) xbmcvfs.delete(os.path.join(path, file))
result = item['Server'].jellyfin.get_item(item['Id']) or {} result = item['Server'].jellyfin.get_item(item['Id']) or {}