mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
Fix manual mappings: preserve on rematch + fix local/external count detection
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user