fix downloaders && mediaservers && notifications

This commit is contained in:
jxxghp
2024-07-02 07:16:33 +08:00
parent b4e1e911fc
commit 9a07d88d41
15 changed files with 142 additions and 190 deletions
+4 -4
View File
@@ -12,14 +12,14 @@ from app.utils.http import RequestUtils
class Jellyfin:
def __init__(self):
self._host = settings.JELLYFIN_HOST
def __init__(self, host: str = None, play_host: str = None, apikey: str = None):
self._host = host
if self._host:
self._host = RequestUtils.standardize_base_url(self._host)
self._playhost = settings.JELLYFIN_PLAY_HOST
self._playhost = play_host
if self._playhost:
self._playhost = RequestUtils.standardize_base_url(self._playhost)
self._apikey = settings.JELLYFIN_API_KEY
self._apikey = apikey
self.user = self.get_user(settings.SUPERUSER)
self.serverid = self.get_server_id()