mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
Prioritize local Jellyfin lyrics over LRCLib in prefetch
Some checks failed
CI / build-and-test (push) Has been cancelled
Some checks failed
CI / build-and-test (push) Has been cancelled
- Check for embedded lyrics in local Jellyfin tracks before fetching from LRCLib - Remove previously cached LRCLib lyrics when local lyrics are found - Prevents unnecessary API calls and respects user's embedded lyrics - Tracks with local lyrics are counted as 'cached' in prefetch stats
This commit is contained in:
@@ -732,7 +732,9 @@ public class AdminController : ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
// Check lyrics status
|
||||
// Check lyrics status (only from our cache - lrclib/Spotify)
|
||||
// Note: For local tracks, Jellyfin may have embedded lyrics that we don't check here
|
||||
// Those will be served directly by Jellyfin when requested
|
||||
var cacheKey = $"lyrics:{track.PrimaryArtist}:{track.Title}:{track.Album}:{track.DurationMs / 1000}";
|
||||
var existingLyrics = await _cache.GetStringAsync(cacheKey);
|
||||
var hasLyrics = !string.IsNullOrEmpty(existingLyrics);
|
||||
|
||||
Reference in New Issue
Block a user