mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user