Fix manual mappings: preserve on rematch + fix local/external count detection

This commit is contained in:
2026-02-04 18:53:09 -05:00
parent 5680b9c7c9
commit 696a2d56f2
2 changed files with 32 additions and 5 deletions

View File

@@ -262,14 +262,21 @@ public class AdminController : ControllerBase
foreach (var item in cachedPlaylistItems)
{
// Check if it's a local track (has Path) or external (no Path)
if (item.TryGetValue("Path", out var pathObj) && pathObj != null)
// Check if it's external by looking for ProviderIds (external songs have this)
var isExternal = false;
if (item.TryGetValue("ProviderIds", out var providerIdsObj) && providerIdsObj != null)
{
localCount++;
// Has ProviderIds = external track
isExternal = true;
}
if (isExternal)
{
externalCount++;
}
else
{
externalCount++;
localCount++;
}
}