File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def lidarr_request(
29
29
logger .debug (f"Error during request: { e } " )
30
30
return None
31
31
32
- def playlist_request (self : "LidarrClass" ) -> list [str ]:
32
+ def playlist_request (self : "LidarrClass" ) -> list [list [ str ] ]:
33
33
"""Request and process playlists from Lidarr."""
34
34
endpoint : str = "/api/v1/importlist"
35
35
raw_playlists : dict | None = self .lidarr_request (endpoint_path = endpoint )
Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ def get_user_list(self: "Spotiplex") -> list[str]:
43
43
def get_sync_lists (self : "Spotiplex" ) -> None :
44
44
"""Runs function to get lidarr lists or splits manual playlists to list."""
45
45
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 ("," )
48
50
49
51
def process_for_user (self : "Spotiplex" , user : str ) -> None :
50
52
"""Syncs playlists for a given user."""
@@ -91,7 +93,10 @@ def process_playlist(self: "Spotiplex", playlist: str) -> None:
91
93
spotify_tracks ,
92
94
)
93
95
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 ,
95
100
)
96
101
logger .debug (f"Processed playlist '{ playlist_name } '." )
97
102
else :
You can’t perform that action at this time.
0 commit comments