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:
2026-02-06 23:48:18 -05:00
parent 64e2004bdc
commit b99a199ef3
4 changed files with 33 additions and 18 deletions

View File

@@ -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);
}