fix: progress bar and add missing tracks section

- Fix external track detection in progress bar (check for external provider names in ProviderIds)
- Add missing tracks section at bottom of Active Playlists tab
- Shows all unmatched tracks across all playlists
- Includes Map to Local and Map to External buttons for each missing track
- Auto-refreshes with other playlist data
This commit is contained in:
2026-02-06 22:12:15 -05:00
parent a6ac0dfbd2
commit ac1fbd4b34
2 changed files with 108 additions and 4 deletions

View File

@@ -374,12 +374,17 @@ public class AdminController : ControllerBase
foreach (var item in cachedPlaylistItems)
{
// Check if it's external by looking for ProviderIds (external songs have this)
// Check if it's external by looking for external provider in ProviderIds
// External providers: SquidWTF, Deezer, Qobuz, Tidal
var isExternal = false;
if (item.TryGetValue("ProviderIds", out var providerIdsObj) && providerIdsObj != null)
if (item.TryGetValue("ProviderIds", out var providerIdsObj) && providerIdsObj is Dictionary<string, string> providerIds)
{
// Has ProviderIds = external track
isExternal = true;
// Check for external provider keys (not MusicBrainz, ISRC, etc)
isExternal = providerIds.Keys.Any(k =>
k.Equals("SquidWTF", StringComparison.OrdinalIgnoreCase) ||
k.Equals("Deezer", StringComparison.OrdinalIgnoreCase) ||
k.Equals("Qobuz", StringComparison.OrdinalIgnoreCase) ||
k.Equals("Tidal", StringComparison.OrdinalIgnoreCase));
}
if (isExternal)