Skip to content

Commit

Permalink
feat: introduce new env var
Browse files Browse the repository at this point in the history
  • Loading branch information
chkpwd committed Oct 27, 2024
1 parent d3b5177 commit 1da3ef1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/plex.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def create_plex_collection(fillers: list[int] = []):

media: ShowSection = plex.library.section(title=var.plex_anime_library)

shows: MediaContainer = media.search(title=var.afl_anime_name)
shows: MediaContainer = media.search(title=var.plex_anime_name)

for show in shows:
plex_episodes: list[Episode] = show.episodes()
Expand Down
2 changes: 2 additions & 0 deletions constants/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class UserConfig:
plex_token (str): The token for the Plex server. Optional.
create_plex_collection (bool): Whether or not to create a Plex collection for the anime. Defaults to False.
plex_anime_library (str): The name of the Plex library to add the anime collection to.
plex_anime_name (str): The name of the anime as shown in Plex.
"""

def __init__(self):
Expand All @@ -47,6 +48,7 @@ def __init__(self):
self._get_env_var("CREATE_PLEX_COLLECTION", required=True, default="False")
)
self.plex_anime_library: str = self._get_env_var("PLEX_ANIME_LIBRARY")
self.plex_anime_name: str = self._get_env_var("PLEX_ANIME_NAME")

@staticmethod
def _get_env_var(
Expand Down

0 comments on commit 1da3ef1

Please sign in to comment.