diff --git a/spotiplex/modules/lidarr/main.py b/spotiplex/modules/lidarr/main.py index 1a1a159..e049b86 100644 --- a/spotiplex/modules/lidarr/main.py +++ b/spotiplex/modules/lidarr/main.py @@ -29,7 +29,7 @@ def lidarr_request( logger.debug(f"Error during request: {e}") return None - def playlist_request(self: "LidarrClass") -> list[str]: + def playlist_request(self: "LidarrClass") -> list[list[str]]: """Request and process playlists from Lidarr.""" endpoint: str = "/api/v1/importlist" raw_playlists: dict | None = self.lidarr_request(endpoint_path=endpoint) diff --git a/spotiplex/modules/spotiplex/main.py b/spotiplex/modules/spotiplex/main.py index c295c52..1d2e2cc 100644 --- a/spotiplex/modules/spotiplex/main.py +++ b/spotiplex/modules/spotiplex/main.py @@ -43,8 +43,10 @@ def get_user_list(self: "Spotiplex") -> list[str]: def get_sync_lists(self: "Spotiplex") -> None: """Runs function to get lidarr lists or splits manual playlists to list.""" if self.lidarr: - self.sync_lists = self.lidarr_service.playlist_request() - self.sync_lists: list[str] = Config.MANUAL_PLAYLISTS.split(",") + lidarr_lists: list[str] = self.lidarr_service.playlist_request()[0] + self.sync_lists: list[str] = lidarr_lists + else: + self.sync_lists: list[str] = Config.MANUAL_PLAYLISTS.split(",") def process_for_user(self: "Spotiplex", user: str) -> None: """Syncs playlists for a given user.""" @@ -91,7 +93,10 @@ def process_playlist(self: "Spotiplex", playlist: str) -> None: spotify_tracks, ) self.plex_service.create_or_update_playlist( - playlist_name, playlist_id, plex_tracks, cover_url + playlist_name, + playlist_id, + plex_tracks, + cover_url, ) logger.debug(f"Processed playlist '{playlist_name}'.") else: