mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
Fix RemovePlaylist to use new 4-field config format
- Include JellyfinId when serializing playlists after removal - Ensures config format stays consistent: [Name,SpotifyId,JellyfinId,position] - Fixes issue where removed playlists would stay in the list
This commit is contained in:
@@ -461,9 +461,9 @@ public class AdminController : ControllerBase
|
|||||||
|
|
||||||
currentPlaylists.Remove(playlist);
|
currentPlaylists.Remove(playlist);
|
||||||
|
|
||||||
// Convert to JSON format for env var
|
// Convert to JSON format for env var: [["Name","SpotifyId","JellyfinId","first|last"],...]
|
||||||
var playlistsJson = JsonSerializer.Serialize(
|
var playlistsJson = JsonSerializer.Serialize(
|
||||||
currentPlaylists.Select(p => new[] { p.Name, p.Id, p.LocalTracksPosition.ToString().ToLower() }).ToArray()
|
currentPlaylists.Select(p => new[] { p.Name, p.Id, p.JellyfinId, p.LocalTracksPosition.ToString().ToLower() }).ToArray()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update .env file
|
// Update .env file
|
||||||
|
|||||||
Reference in New Issue
Block a user