Skip to content

Commit d5addfa

Browse files
committed
Fixes #28
1 parent 98c97d0 commit d5addfa

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

spotiplex/modules/lidarr/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def lidarr_request(
2929
logger.debug(f"Error during request: {e}")
3030
return None
3131

32-
def playlist_request(self: "LidarrClass") -> list[str]:
32+
def playlist_request(self: "LidarrClass") -> list[list[str]]:
3333
"""Request and process playlists from Lidarr."""
3434
endpoint: str = "/api/v1/importlist"
3535
raw_playlists: dict | None = self.lidarr_request(endpoint_path=endpoint)

spotiplex/modules/spotiplex/main.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ def get_user_list(self: "Spotiplex") -> list[str]:
4343
def get_sync_lists(self: "Spotiplex") -> None:
4444
"""Runs function to get lidarr lists or splits manual playlists to list."""
4545
if self.lidarr:
46-
self.sync_lists = self.lidarr_service.playlist_request()
47-
self.sync_lists: list[str] = Config.MANUAL_PLAYLISTS.split(",")
46+
lidarr_lists: list[str] = self.lidarr_service.playlist_request()[0]
47+
self.sync_lists: list[str] = lidarr_lists
48+
else:
49+
self.sync_lists: list[str] = Config.MANUAL_PLAYLISTS.split(",")
4850

4951
def process_for_user(self: "Spotiplex", user: str) -> None:
5052
"""Syncs playlists for a given user."""
@@ -91,7 +93,10 @@ def process_playlist(self: "Spotiplex", playlist: str) -> None:
9193
spotify_tracks,
9294
)
9395
self.plex_service.create_or_update_playlist(
94-
playlist_name, playlist_id, plex_tracks, cover_url
96+
playlist_name,
97+
playlist_id,
98+
plex_tracks,
99+
cover_url,
95100
)
96101
logger.debug(f"Processed playlist '{playlist_name}'.")
97102
else:

0 commit comments

Comments
 (0)