feat: fetch lyrics during music ingest

This commit is contained in:
2026-07-20 20:27:20 +08:00
parent 3462881a0a
commit 0ba6297596
4 changed files with 147 additions and 0 deletions
@@ -90,6 +90,8 @@ public class IngestService {
private final TraditionalFilterService traditionalFilterService;
private final ConfigService configService;
private final AudioValidationService audioValidationService;
@Autowired(required = false)
private LyricsService lyricsService;
/**
* Spring DI 构造器。
@@ -648,6 +650,9 @@ public class IngestService {
if (tag != null) {
extractEmbeddedLyrics(tag, targetDir, trackStr, safeTitle, title, effectiveArtist);
}
if (lyricsService != null) {
lyricsService.fetchIfMissing(targetDir.resolve(destFileName), title, effectiveArtist);
}
return "ingested";
}