mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
fix: Spotify lyrics validation and proactive prefetching
- Only attempt Spotify lyrics for tracks with valid Spotify IDs (22 chars, no 'local' or ':') - Add Spotify IDs to external matched tracks in playlists for lyrics support - Proactively fetch and cache lyrics when playback starts (background task) - Fix pre-existing SubSonicController bug (missing _cache field) - Lyrics now ready instantly when requested by client
This commit is contained in:
@@ -28,6 +28,7 @@ public class SubsonicController : ControllerBase
|
||||
private readonly SubsonicModelMapper _modelMapper;
|
||||
private readonly SubsonicProxyService _proxyService;
|
||||
private readonly PlaylistSyncService? _playlistSyncService;
|
||||
private readonly RedisCacheService _cache;
|
||||
private readonly ILogger<SubsonicController> _logger;
|
||||
|
||||
public SubsonicController(
|
||||
@@ -39,6 +40,7 @@ public class SubsonicController : ControllerBase
|
||||
SubsonicResponseBuilder responseBuilder,
|
||||
SubsonicModelMapper modelMapper,
|
||||
SubsonicProxyService proxyService,
|
||||
RedisCacheService cache,
|
||||
ILogger<SubsonicController> logger,
|
||||
PlaylistSyncService? playlistSyncService = null)
|
||||
{
|
||||
@@ -51,6 +53,7 @@ public class SubsonicController : ControllerBase
|
||||
_modelMapper = modelMapper;
|
||||
_proxyService = proxyService;
|
||||
_playlistSyncService = playlistSyncService;
|
||||
_cache = cache;
|
||||
_logger = logger;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_subsonicSettings.Url))
|
||||
|
||||
Reference in New Issue
Block a user