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
@@ -158,5 +158,5 @@ async function searchItunesAlbumTracks(artist, album) {
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
sanitize, navidromeArtist,
|
sanitize, navidromeArtist,
|
||||||
downloadArtwork, findExistingTrack,
|
downloadArtwork, findExistingTrack,
|
||||||
fetchLyrics, lookupItunesTrackMeta, fetchItunesTracks, searchItunesAlbumTracks,
|
lookupItunesTrackMeta, fetchItunesTracks, searchItunesAlbumTracks,
|
||||||
};
|
};
|
||||||
+2
-14
@@ -5,7 +5,7 @@ const CONFIG = require('./config');
|
|||||||
const { log } = require('./jobs');
|
const { log } = require('./jobs');
|
||||||
const {
|
const {
|
||||||
sanitize, navidromeArtist,
|
sanitize, navidromeArtist,
|
||||||
downloadArtwork, fetchLyrics, findExistingTrack,
|
downloadArtwork, findExistingTrack,
|
||||||
} = require('./metadata');
|
} = require('./metadata');
|
||||||
|
|
||||||
function buildTitleKeywords(title) {
|
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
|
// 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 }) {
|
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([
|
const coverPath = await downloadArtwork(artworkUrl, dir);
|
||||||
downloadArtwork(artworkUrl, dir),
|
|
||||||
fetchLyrics(artist, title, album),
|
|
||||||
]);
|
|
||||||
const hasCover = !!(coverPath && fs.existsSync(coverPath));
|
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)}`);
|
log(jobId, `🏷 Metadaten + Cover → ${path.basename(audioFile)}`);
|
||||||
|
|
||||||
const fileExt = path.extname(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 (discNum) ffArgs.push('-metadata', `disc=${discTotal ? `${discNum}/${discTotal}` : String(discNum)}`);
|
||||||
if (compilation) ffArgs.push('-metadata', `compilation=1`);
|
if (compilation) ffArgs.push('-metadata', `compilation=1`);
|
||||||
if (explicit) ffArgs.push('-metadata', 'ITUNESADVISORY=1');
|
if (explicit) ffArgs.push('-metadata', 'ITUNESADVISORY=1');
|
||||||
if (lyricsData?.plain) ffArgs.push('-metadata', `lyrics=${lyricsData.plain}`);
|
|
||||||
if (hasCover) {
|
if (hasCover) {
|
||||||
ffArgs.push(
|
ffArgs.push(
|
||||||
'-metadata:s:v', 'title=Album cover',
|
'-metadata:s:v', 'title=Album cover',
|
||||||
|
|||||||
Reference in new issue
Block a user