This commit is contained in:
jxxghp
2023-06-07 18:28:54 +08:00
parent b6ae0886af
commit 852a255eaf
10 changed files with 39 additions and 12 deletions

View File

@ -14,6 +14,11 @@ class Plex(metaclass=Singleton):
def __init__(self):
self._host = settings.PLEX_HOST
if self._host:
if not self._host.endswith("/"):
self._host += "/"
if not self._host.startswith("http"):
self._host = "http://" + self._host
self._token = settings.PLEX_TOKEN
if self._host and self._token:
try: