mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-09 23:55:10 -05:00
Fix lyrics fetching and disable prefetching
- Fix LyricsPrefetchService to use server API key for Jellyfin lyrics checks - Remove Spotify lyrics caching (local Docker container is fast) - Disable lyrics prefetching service (not needed - Jellyfin/Spotify are fast) - Add POST /api/admin/cache/clear-lyrics endpoint to clear LRCLIB cache - Only LRCLIB lyrics are cached now (external API)
This commit is contained in:
@@ -63,15 +63,7 @@ public class SpotifyLyricsService
|
||||
// Normalize track ID (remove URI prefix if present)
|
||||
spotifyTrackId = ExtractTrackId(spotifyTrackId);
|
||||
|
||||
// Check cache
|
||||
var cacheKey = $"spotify:lyrics:{spotifyTrackId}";
|
||||
var cached = await _cache.GetAsync<SpotifyLyricsResult>(cacheKey);
|
||||
if (cached != null)
|
||||
{
|
||||
_logger.LogDebug("Returning cached Spotify lyrics for track {TrackId}", spotifyTrackId);
|
||||
return cached;
|
||||
}
|
||||
|
||||
// NO CACHING - Spotify lyrics come from local Docker container (fast)
|
||||
try
|
||||
{
|
||||
var url = $"{_settings.LyricsApiUrl}/?trackid={spotifyTrackId}&format=id3";
|
||||
@@ -92,8 +84,6 @@ public class SpotifyLyricsService
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
// Cache for 30 days (lyrics don't change)
|
||||
await _cache.SetAsync(cacheKey, result, TimeSpan.FromDays(30));
|
||||
_logger.LogInformation("Got Spotify lyrics from sidecar for track {TrackId} ({LineCount} lines)",
|
||||
spotifyTrackId, result.Lines.Count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user