Skip to content

Commit 8197800

Browse files
committed
feat: raise Exception when ENVs they aren't set
1 parent 4e8c163 commit 8197800

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mov_cli_jellyplex/jellyfin/scraper.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ def scrape(self, metadata: Metadata, episode: EpisodeSelector) -> Single | Multi
130130
)
131131

132132
def __get_auth(self):
133+
if self.base_url is None:
134+
raise Exception("You haven't set the 'JELLY_URL' env!")
135+
136+
if self.username is None:
137+
raise Exception("You haven't set the 'JELLY_USERNAME' env!")
138+
139+
if self.password is None:
140+
raise Exception("You haven't set the 'JELLY_PASSWORD' env!")
141+
133142
cached: Optional[dict] = self.cache.get_cache("jellyfin_login")
134143

135144
if cached is not None:

0 commit comments

Comments
 (0)