remove: lyrics downloading (fetchLyrics, .lrc files, uslt tag embedding)
Removes LRCLIB lookup, .lrc sidecar file writing, and lyrics/uslt metadata embedding from all downloads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
52ba73506f
commit
e05daf3824
2 files changed
+3
-15
No files matched your search
+2
-14
@@ -5,7 +5,7 @@ const CONFIG = require('./config');
|
||||
const { log } = require('./jobs');
|
||||
const {
|
||||
sanitize, navidromeArtist,
|
||||
downloadArtwork, fetchLyrics, findExistingTrack,
|
||||
downloadArtwork, findExistingTrack,
|
||||
} = require('./metadata');
|
||||
|
||||
function buildTitleKeywords(title) {
|
||||
@@ -283,20 +283,9 @@ async function downloadTrack({ jobId, artist, albumArtist, title, album, year, t
|
||||
|
||||
// Shared ffmpeg metadata embedding — used by both yt-dlp and squid paths
|
||||
async function embedMetadata({ jobId, audioFile, dir, trackPrefix, safeTitle, artist, mainArtist, album, year, trackNum, totalTracks, discNum, discTotal, compilation, genre, artworkUrl, explicit, title }) {
|
||||
const [coverPath, lyricsData] = await Promise.all([
|
||||
downloadArtwork(artworkUrl, dir),
|
||||
fetchLyrics(artist, title, album),
|
||||
]);
|
||||
const coverPath = await downloadArtwork(artworkUrl, dir);
|
||||
const hasCover = !!(coverPath && fs.existsSync(coverPath));
|
||||
|
||||
if (lyricsData?.synced) {
|
||||
const lrcPath = path.join(dir, `${trackPrefix}${safeTitle}.lrc`);
|
||||
fs.writeFileSync(lrcPath, lyricsData.synced, 'utf8');
|
||||
log(jobId, '🎵 Synced lyrics gefunden');
|
||||
} else if (lyricsData?.plain) {
|
||||
log(jobId, '📝 Lyrics gefunden');
|
||||
}
|
||||
|
||||
log(jobId, `🏷 Metadaten + Cover → ${path.basename(audioFile)}`);
|
||||
|
||||
const fileExt = path.extname(audioFile);
|
||||
@@ -322,7 +311,6 @@ async function embedMetadata({ jobId, audioFile, dir, trackPrefix, safeTitle, ar
|
||||
if (discNum) ffArgs.push('-metadata', `disc=${discTotal ? `${discNum}/${discTotal}` : String(discNum)}`);
|
||||
if (compilation) ffArgs.push('-metadata', `compilation=1`);
|
||||
if (explicit) ffArgs.push('-metadata', 'ITUNESADVISORY=1');
|
||||
if (lyricsData?.plain) ffArgs.push('-metadata', `lyrics=${lyricsData.plain}`);
|
||||
if (hasCover) {
|
||||
ffArgs.push(
|
||||
'-metadata:s:v', 'title=Album cover',
|
||||
|
||||
Reference in new issue
Block a user