mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -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:
@@ -1738,6 +1738,30 @@ public class AdminController : ControllerBase
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear all cached lyrics (LRCLIB only - Jellyfin and Spotify lyrics are not cached)
|
||||
/// </summary>
|
||||
[HttpPost("cache/clear-lyrics")]
|
||||
public async Task<IActionResult> ClearLyricsCache()
|
||||
{
|
||||
_logger.LogInformation("Lyrics cache clear requested from admin UI");
|
||||
|
||||
var clearedRedisKeys = 0;
|
||||
|
||||
// Clear all lyrics cache keys (pattern-based deletion)
|
||||
// This includes LRCLIB lyrics and manual mappings
|
||||
var lyricsKeysDeleted = await _cache.DeleteByPatternAsync("lyrics:*");
|
||||
clearedRedisKeys += lyricsKeysDeleted;
|
||||
|
||||
_logger.LogInformation("Lyrics cache cleared: {RedisKeys} Redis keys deleted", clearedRedisKeys);
|
||||
|
||||
return Ok(new {
|
||||
message = "Lyrics cache cleared successfully",
|
||||
redisKeysDeleted = clearedRedisKeys,
|
||||
note = "Only LRCLIB lyrics are cached. Jellyfin and Spotify lyrics are fetched on-demand (fast)."
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restart the allstarr container to apply configuration changes
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user