less metric logging for download function

This commit is contained in:
shaun 2017-02-05 11:00:20 +11:00
parent c8b1e738c6
commit e90919e6b6
2 changed files with 6 additions and 7 deletions

View file

@ -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.44" version="2.3.45"
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"/>

View file

@ -216,10 +216,10 @@ class DownloadUtils(object):
self._ensure_server(server_id) self._ensure_server(server_id)
server = self.session if server_id is None else self.servers[server_id] server = self.session if server_id is None else self.servers[server_id]
if server is None or server.get("Server", None) is None or server.get("UserId", None) is None: if not server or not server.get("Server") or not server.get("UserId"):
log.info("Aborting download, Server Details Error: %s url=%s" % (server, url)) 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 = Exception("Aborting download, Server Details Error: %s url=%s" % (server, url))
#exc.quiet = True exc.quiet = True
raise exc raise exc
if server_id is None and self.session_requests is not None: # Main server if server_id is None and self.session_requests is not None: # Main server
@ -238,7 +238,7 @@ class DownloadUtils(object):
# does the URL look ok # does the URL look ok
if url.startswith('/'): if url.startswith('/'):
exc = Exception("URL Error: " + url) exc = Exception("URL Error: " + url)
#exc.quiet = True exc.quiet = True
raise exc raise exc
##### PREPARE REQUEST ##### ##### PREPARE REQUEST #####
@ -326,9 +326,8 @@ class DownloadUtils(object):
message="Unauthorized.", message="Unauthorized.",
icon=xbmcgui.NOTIFICATION_ERROR) icon=xbmcgui.NOTIFICATION_ERROR)
exc = Exception("HTTPError : " + str(response.status_code) + " : " + str(error)) error.quiet = True
#exc.quiet = True raise
raise exc
# if we got to here and did not process the download for some reason then that is bad # if we got to here and did not process the download for some reason then that is bad
exc = Exception("Unhandled Download : %s", url) exc = Exception("Unhandled Download : %s", url)