mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-10-08 18:02:03 +00:00
Increase amount of logging
This commit is contained in:
parent
c321b266f0
commit
9ae99de8dd
30 changed files with 641 additions and 620 deletions
|
@ -484,7 +484,7 @@ class PlayUtils(object):
|
|||
try:
|
||||
subs.append(self.download_external_subs(url, filename))
|
||||
except Exception as error:
|
||||
LOG.error(error)
|
||||
LOG.exception(error)
|
||||
subs.append(url)
|
||||
else:
|
||||
subs.append(url)
|
||||
|
@ -512,7 +512,8 @@ class PlayUtils(object):
|
|||
try:
|
||||
response = requests.get(src, stream=True, verify=False)
|
||||
response.raise_for_status()
|
||||
except Exception as e:
|
||||
except Exception as error:
|
||||
LOG.exception(error)
|
||||
raise
|
||||
else:
|
||||
response.encoding = 'utf-8'
|
||||
|
|
|
@ -172,7 +172,7 @@ def should_stop():
|
|||
return False
|
||||
|
||||
def get_screensaver():
|
||||
|
||||
|
||||
''' Get the current screensaver value.
|
||||
'''
|
||||
result = JSONRPC('Settings.getSettingValue').execute({'setting': "screensaver.mode"})
|
||||
|
@ -182,7 +182,7 @@ def get_screensaver():
|
|||
return ""
|
||||
|
||||
def set_screensaver(value):
|
||||
|
||||
|
||||
''' Toggle the screensaver
|
||||
'''
|
||||
params = {
|
||||
|
@ -198,7 +198,7 @@ class JSONRPC(object):
|
|||
jsonrpc = "2.0"
|
||||
|
||||
def __init__(self, method, **kwargs):
|
||||
|
||||
|
||||
self.method = method
|
||||
|
||||
for arg in kwargs:
|
||||
|
@ -249,7 +249,7 @@ def values(item, keys):
|
|||
return (item[key.replace('{', "").replace('}', "")] if type(key) == str and key.startswith('{') else key for key in keys)
|
||||
|
||||
def indent(elem, level=0):
|
||||
|
||||
|
||||
''' Prettify xml docs.
|
||||
'''
|
||||
try:
|
||||
|
@ -266,7 +266,8 @@ def indent(elem, level=0):
|
|||
else:
|
||||
if level and (not elem.tail or not elem.tail.strip()):
|
||||
elem.tail = i
|
||||
except Exception:
|
||||
except Exception as error:
|
||||
LOG.exception(error)
|
||||
return
|
||||
|
||||
def write_xml(content, file):
|
||||
|
@ -292,7 +293,7 @@ def delete_folder(path=None):
|
|||
|
||||
if delete_path:
|
||||
xbmcvfs.delete(path)
|
||||
|
||||
|
||||
LOG.info("DELETE %s", path)
|
||||
|
||||
def delete_recursive(path, dirs):
|
||||
|
@ -314,7 +315,7 @@ def unzip(path, dest, folder=None):
|
|||
'''
|
||||
path = urllib.quote_plus(path)
|
||||
root = "zip://" + path + '/'
|
||||
|
||||
|
||||
if folder:
|
||||
|
||||
xbmcvfs.mkdir(os.path.join(dest, folder))
|
||||
|
@ -431,7 +432,7 @@ def normalize_string(text):
|
|||
return text
|
||||
|
||||
def split_list(itemlist, size):
|
||||
|
||||
|
||||
''' Split up list in pieces of size. Will generate a list of lists
|
||||
'''
|
||||
return [itemlist[i:i+size] for i in range(0, len(itemlist), size)]
|
||||
|
@ -447,6 +448,6 @@ def convert_to_local(date):
|
|||
|
||||
return date.strftime('%Y-%m-%dT%H:%M:%S')
|
||||
except Exception as error:
|
||||
LOG.error(error)
|
||||
LOG.exception(error)
|
||||
|
||||
return str(date)
|
||||
|
|
|
@ -84,10 +84,11 @@ def stop(default=None):
|
|||
def wrapper(*args, **kwargs):
|
||||
|
||||
try:
|
||||
if should_stop():
|
||||
if should_stop(): # ??? TODO: Fixme
|
||||
raise Exception
|
||||
|
||||
except Exception as error:
|
||||
LOG.exception(error)
|
||||
|
||||
if default is not None:
|
||||
return default
|
||||
|
@ -142,7 +143,8 @@ def library_check():
|
|||
|
||||
try:
|
||||
views = self.jellyfin_db.get_views_by_media('music')[0]
|
||||
except Exception:
|
||||
except Exception as error:
|
||||
LOG.exception(error)
|
||||
return
|
||||
|
||||
view = {'Id': views[0], 'Name': views[1]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue