Skip to content

Commit

Permalink
add new env
Browse files Browse the repository at this point in the history
  • Loading branch information
chkpwd committed Oct 24, 2024
1 parent f14be7e commit 57092c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.pub
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ SONARR_API_KEY="<your_api_key>"
PLEX_URL="http://127.0.0.1:32400"
PLEX_TOKEN="<your_plex_token>"
CREATE_PLEX_COLLECTION="True"
MONITOR_NON_FILLER_EPISODES="True"
PLEX_ANIME_LIBRARY="<your_plex_anime_library>"
8 changes: 7 additions & 1 deletion constants/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
import sys
import logging

from dotenv import load_dotenv


load_dotenv(dotenv_path=".env.priv")

logging.basicConfig(level=logging.INFO)

Expand All @@ -38,7 +42,9 @@ def __init__(self):
"SONARR_SERIES_ID", required=True, default=""
))
self.sonarr_api_key: str = self._get_env_var("SONARR_API_KEY", required=True)

self.monitor_sonarr_episodes: bool = bool(
self._get_env_var("MONITOR_NON_FILLER_EPISODES", default=""
))
self.plex_url: str = self._get_env_var("PLEX_URL")
self.plex_token: str = self._get_env_var(
"PLEX_TOKEN", required=bool(self.plex_url)
Expand Down
3 changes: 0 additions & 3 deletions load_env.py

This file was deleted.

0 comments on commit 57092c4

Please sign in to comment.