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>();
|
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)
|
foreach (var playlistId in _spotifySettings.PlaylistIds)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Get playlist name
|
// Use hardcoded name or fall back to ID
|
||||||
var playlistInfo = await _proxyService.GetJsonAsync($"Items/{playlistId}", null, Request.Headers);
|
var playlistName = playlistNames.ContainsKey(playlistId)
|
||||||
var playlistName = playlistInfo?.RootElement.GetProperty("Name").GetString() ?? playlistId;
|
? playlistNames[playlistId]
|
||||||
|
: playlistId;
|
||||||
|
|
||||||
_logger.LogInformation("Fetching missing tracks for {Playlist} (ID: {Id})", playlistName, playlistId);
|
_logger.LogInformation("Fetching missing tracks for {Playlist} (ID: {Id})", playlistName, playlistId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user