diff --git a/media/pvr.py b/media/pvr.py index ccb6174..bedce25 100644 --- a/media/pvr.py +++ b/media/pvr.py @@ -26,7 +26,7 @@ class PVR(ABC): try: # request system status to validate api_key req = requests.get( - os.path.join(misc_str.ensure_endswith(self.server_url, "/"), 'api/system/status'), + os.path.join(misc_str.ensure_endswith(self.server_url, "/"), 'api/v3/system/status'), headers=self.headers, timeout=60, allow_redirects=False @@ -72,7 +72,7 @@ class PVR(ABC): try: # make request req = requests.get( - os.path.join(misc_str.ensure_endswith(self.server_url, "/"), 'api/profile'), + os.path.join(misc_str.ensure_endswith(self.server_url, "/"), 'api/v3/profile'), headers=self.headers, timeout=60, allow_redirects=False diff --git a/media/radarr.py b/media/radarr.py index 85dc740..132821b 100644 --- a/media/radarr.py +++ b/media/radarr.py @@ -9,10 +9,10 @@ log = logger.get_logger(__name__) class Radarr(PVR): def get_objects(self): - return self._get_objects('api/movie') + return self._get_objects('api/v3/movie') def get_exclusions(self): - return self._get_objects('api/exclusions') + return self._get_objects('api/v3/exclusions') @backoff.on_predicate(backoff.expo, lambda x: x is None, max_tries=4, on_backoff=backoff_handler) def add_movie(self, movie_tmdb_id, movie_title, movie_year, movie_title_slug, quality_profile_id, root_folder, @@ -38,4 +38,4 @@ class Radarr(PVR): } }) - return self._add_object('api/movie', payload, identifier_field='tmdbId', identifier=movie_tmdb_id) + return self._add_object('api/v3/movie', payload, identifier_field='tmdbId', identifier=movie_tmdb_id)