mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
dont worry about server details if the url does nto have server and user id placeholders in it
This commit is contained in:
parent
ee01e7cb5e
commit
72c76adbf8
2 changed files with 9 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.emby"
|
||||
name="Emby"
|
||||
version="2.3.45"
|
||||
version="2.3.46"
|
||||
provider-name="Emby.media">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.19.0"/>
|
||||
|
|
|
@ -216,7 +216,11 @@ class DownloadUtils(object):
|
|||
self._ensure_server(server_id)
|
||||
server = self.session if server_id is None else self.servers[server_id]
|
||||
|
||||
if not server or not server.get("Server") or not server.get("UserId"):
|
||||
requires_server = False
|
||||
if url.find("{server}") > -1 or url.find("{UserId}") > -1:
|
||||
requires_server = True
|
||||
|
||||
if requires_server and (not server or not server.get("Server") or not server.get("UserId")):
|
||||
log.info("Aborting download, Server Details Error: %s url=%s" % (server, url))
|
||||
exc = Exception("Aborting download, Server Details Error: %s url=%s" % (server, url))
|
||||
exc.quiet = True
|
||||
|
@ -232,8 +236,9 @@ class DownloadUtils(object):
|
|||
})
|
||||
|
||||
# Replace for the real values
|
||||
url = url.replace("{server}", server['Server'])
|
||||
url = url.replace("{UserId}", server['UserId'])
|
||||
if requires_server:
|
||||
url = url.replace("{server}", server['Server'])
|
||||
url = url.replace("{UserId}", server['UserId'])
|
||||
|
||||
# does the URL look ok
|
||||
if url.startswith('/'):
|
||||
|
|
Loading…
Reference in a new issue