mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
check url after replace to see if it look ok
This commit is contained in:
parent
5b86aa1ca9
commit
5d06f04d1d
2 changed files with 5 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.emby"
|
<addon id="plugin.video.emby"
|
||||||
name="Emby"
|
name="Emby"
|
||||||
version="2.3.17"
|
version="2.3.18"
|
||||||
provider-name="Emby.media">
|
provider-name="Emby.media">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.19.0"/>
|
<import addon="xbmc.python" version="2.19.0"/>
|
||||||
|
|
|
@ -225,18 +225,14 @@ class DownloadUtils(object):
|
||||||
'headers': self.get_header(server_id, authenticate)
|
'headers': self.get_header(server_id, authenticate)
|
||||||
})
|
})
|
||||||
|
|
||||||
if not server['Server'] or not server['UserId']:
|
|
||||||
log.error("Server or UserId not set, not logged in, returning None")
|
|
||||||
xbmcgui.Dialog().notification(heading=lang(29999),
|
|
||||||
message="Not Logged In",
|
|
||||||
icon=xbmcgui.NOTIFICATION_ERROR,
|
|
||||||
time=5000)
|
|
||||||
raise internal_exceptions.ExceptionWrapper("Not Logged In")
|
|
||||||
|
|
||||||
# Replace for the real values
|
# Replace for the real values
|
||||||
url = url.replace("{server}", server['Server'])
|
url = url.replace("{server}", server['Server'])
|
||||||
url = url.replace("{UserId}", server['UserId'])
|
url = url.replace("{UserId}", server['UserId'])
|
||||||
|
|
||||||
|
# does the URL look ok
|
||||||
|
if url.startswith('/'):
|
||||||
|
raise internal_exceptions.ExceptionWrapper("URL Error: " + url)
|
||||||
|
|
||||||
##### PREPARE REQUEST #####
|
##### PREPARE REQUEST #####
|
||||||
kwargs.update({
|
kwargs.update({
|
||||||
'url': url,
|
'url': url,
|
||||||
|
|
Loading…
Reference in a new issue