diff --git a/varken/radarr.py b/varken/radarr.py index d5ad5149..e8a15d06 100644 --- a/varken/radarr.py +++ b/varken/radarr.py @@ -2,7 +2,7 @@ from requests import Session, Request from datetime import datetime, timezone -from varken.structures import Movie, Queue +from varken.structures import RadarrMovie, Queue from varken.helpers import hashit, connection_handler @@ -31,9 +31,9 @@ def get_missing(self): return try: - movies = [Movie(**movie) for movie in get] + movies = [RadarrMovie(**movie) for movie in get] except TypeError as e: - self.logger.error('TypeError has occurred : %s while creating Movie structure', e) + self.logger.error('TypeError has occurred : %s while creating RadarrMovie structure', e) return for movie in movies: @@ -82,9 +82,9 @@ def get_queue(self): for movie in get: try: - movie['movie'] = Movie(**movie['movie']) + movie['movie'] = RadarrMovie(**movie['movie']) except TypeError as e: - self.logger.error('TypeError has occurred : %s while creating Movie structure', e) + self.logger.error('TypeError has occurred : %s while creating RadarrMovie structure', e) return try: diff --git a/varken/sonarr.py b/varken/sonarr.py index 3f807c49..b90dad9d 100644 --- a/varken/sonarr.py +++ b/varken/sonarr.py @@ -2,7 +2,7 @@ from requests import Session, Request from datetime import datetime, timezone, date, timedelta -from varken.structures import Queue, TVShow +from varken.structures import Queue, SonarrTVShow from varken.helpers import hashit, connection_handler @@ -34,11 +34,11 @@ def get_missing(self): if not get: return - # Iteratively create a list of TVShow Objects from response json + # Iteratively create a list of SonarrTVShow Objects from response json try: - tv_shows = [TVShow(**show) for show in get] + tv_shows = [SonarrTVShow(**show) for show in get] except TypeError as e: - self.logger.error('TypeError has occurred : %s while creating TVShow structure', e) + self.logger.error('TypeError has occurred : %s while creating SonarrTVShow structure', e) return # Add show to missing list if file does not exist @@ -87,9 +87,9 @@ def get_future(self): return try: - tv_shows = [TVShow(**show) for show in get] + tv_shows = [SonarrTVShow(**show) for show in get] except TypeError as e: - self.logger.error('TypeError has occurred : %s while creating TVShow structure', e) + self.logger.error('TypeError has occurred : %s while creating SonarrTVShow structure', e) return for show in tv_shows: diff --git a/varken/structures.py b/varken/structures.py index 7ca25057..0672f502 100644 --- a/varken/structures.py +++ b/varken/structures.py @@ -171,7 +171,7 @@ class OmbiMovieRequest(NamedTuple): # Sonarr -class TVShow(NamedTuple): +class SonarrTVShow(NamedTuple): absoluteEpisodeNumber: int = None airDate: str = None airDateUtc: str = None @@ -194,7 +194,7 @@ class TVShow(NamedTuple): # Radarr -class Movie(NamedTuple): +class RadarrMovie(NamedTuple): added: str = None addOptions: str = None alternativeTitles: list = None