mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
use hardcoded playlist names for Spotify sync
This commit is contained in:
@@ -1993,13 +1993,21 @@ public class JellyfinController : ControllerBase
|
||||
|
||||
var results = new Dictionary<string, object>();
|
||||
|
||||
// Hardcoded playlist names that match the Spotify Import plugin format
|
||||
var playlistNames = new Dictionary<string, string>
|
||||
{
|
||||
{ "4383a46d8bcac3be2ef9385053ea18df", "Discover Weekly" },
|
||||
{ "ba50e26c867ec9d57ab2f7bf24cfd6b0", "Release Radar" }
|
||||
};
|
||||
|
||||
foreach (var playlistId in _spotifySettings.PlaylistIds)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Get playlist name
|
||||
var playlistInfo = await _proxyService.GetJsonAsync($"Items/{playlistId}", null, Request.Headers);
|
||||
var playlistName = playlistInfo?.RootElement.GetProperty("Name").GetString() ?? playlistId;
|
||||
// Use hardcoded name or fall back to ID
|
||||
var playlistName = playlistNames.ContainsKey(playlistId)
|
||||
? playlistNames[playlistId]
|
||||
: playlistId;
|
||||
|
||||
_logger.LogInformation("Fetching missing tracks for {Playlist} (ID: {Id})", playlistName, playlistId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user