Var initit (fixes #8)

This commit is contained in:
Chris Browet 2021-07-02 09:58:39 +02:00
parent b76040e947
commit 5221f19504

View file

@ -643,6 +643,9 @@ class JellyfinClientManager(object):
self.jf_client.stop() self.jf_client.stop()
time.sleep(timeout) time.sleep(timeout)
if self.login(): if self.login():
self.jf_client.callback = event
self.jf_client.callback_ws = event
self.jf_client.start(True)
break break
elif event_name in ("LibraryChanged", "UserDataChanged"): elif event_name in ("LibraryChanged", "UserDataChanged"):
for sensor in self.hass.data[DOMAIN][self.host]["sensor"]["entities"]: for sensor in self.hass.data[DOMAIN][self.host]["sensor"]["entities"]:
@ -1227,6 +1230,9 @@ class JellyfinClientManager(object):
if selected is None: if selected is None:
return (None, None, None) return (None, None, None)
url = ""
mimetype = "none/none"
info = "Not playable"
if selected["SupportsDirectStream"]: if selected["SupportsDirectStream"]:
if media_content_type in ("Audio", "track"): if media_content_type in ("Audio", "track"):
mimetype = "audio/" + selected["Container"] mimetype = "audio/" + selected["Container"]