Fix undefined errors
This commit is contained in:
@@ -232,6 +232,7 @@ class CacheArtwork(threading.Thread):
|
||||
if isinstance(results, dict):
|
||||
results = results.get("Items")
|
||||
|
||||
settings = xbmcaddon.Addon()
|
||||
server = settings.getSetting('server_address')
|
||||
log.debug("Jellyfin Item Count Count: {0}".format(len(results)))
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ def __get_parent_id_from(params):
|
||||
log.debug("TV show providers IDs: {}".format(show_provider_ids))
|
||||
get_show_url = "/Users/{}/Items?fields=MediaStreams&Recursive=true" \
|
||||
"&IncludeItemTypes=series&IncludeMedia=true&ImageTypeLimit=1&Limit=16" \
|
||||
"&AnyProviderIdEquals={}".format(api.user_id, item_id, show_provider_ids)
|
||||
"&AnyProviderIdEquals={}".format(api.user_id, show_provider_ids)
|
||||
content = dataManager.get_content(get_show_url)
|
||||
show = content.get("Items")
|
||||
if len(show) == 1:
|
||||
|
||||
@@ -33,6 +33,8 @@ def show_server_sessions():
|
||||
return
|
||||
|
||||
list_items = []
|
||||
settings = xbmcaddon.Addon()
|
||||
server = settings.getSetting('server_address')
|
||||
for session in results:
|
||||
device_name = session.get("DeviceName", "na")
|
||||
user_name = session.get("UserName", "na")
|
||||
@@ -57,7 +59,6 @@ def show_server_sessions():
|
||||
|
||||
art = {}
|
||||
if now_playing:
|
||||
server = settings.getSetting('server_address')
|
||||
art = get_art(now_playing, server)
|
||||
|
||||
runtime = now_playing.get("RunTimeTicks", 0)
|
||||
|
||||
@@ -12,6 +12,7 @@ import xbmc
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
|
||||
from .api import API
|
||||
from .functions import play_action
|
||||
from .loghandler import LazyLogger
|
||||
from .jsonrpc import JsonRpc
|
||||
@@ -290,6 +291,7 @@ class WebSocketClient(threading.Thread):
|
||||
|
||||
def post_capabilities(self):
|
||||
|
||||
settings = xbmcaddon.Addon()
|
||||
user_details = load_user_details()
|
||||
|
||||
api = API(
|
||||
|
||||
Reference in New Issue
Block a user