fix: install yt-dlp via pip3 for latest version, fix multi-artist folder path
- Replace apk yt-dlp with pip3 install to get current version with ytmsearch support - Split mainArtist on comma in downloadTrack so multi-artist tracks always land in the primary artist folder (e.g. "Artist1, Artist2" → Artist1/) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
59562fe156
commit
595fb2b7f3
2 files changed
+4
-2
No files matched your search
@@ -163,7 +163,8 @@ async function lookupItunesTrackMeta(artist, title) {
|
|||||||
// Download a single track: yt-dlp audio + ffmpeg clean metadata + iTunes cover embedded
|
// Download a single track: yt-dlp audio + ffmpeg clean metadata + iTunes cover embedded
|
||||||
async function downloadTrack({ jobId, artist, albumArtist, title, album, year, trackNum, totalTracks, discNum, discTotal, durationMs, compilation, genre, artworkUrl, explicit, outputDir }) {
|
async function downloadTrack({ jobId, artist, albumArtist, title, album, year, trackNum, totalTracks, discNum, discTotal, durationMs, compilation, genre, artworkUrl, explicit, outputDir }) {
|
||||||
const mainArtist = albumArtist || artist;
|
const mainArtist = albumArtist || artist;
|
||||||
const safeArtist = sanitize(mainArtist);
|
// use only the first artist for the folder path (e.g. "Artist1, Artist2" → "Artist1")
|
||||||
|
const safeArtist = sanitize(mainArtist.split(',')[0].trim());
|
||||||
const safeAlbum = sanitize(album || 'Singles');
|
const safeAlbum = sanitize(album || 'Singles');
|
||||||
const dir = path.join(outputDir || CONFIG.musicPath, safeArtist, safeAlbum);
|
const dir = path.join(outputDir || CONFIG.musicPath, safeArtist, safeAlbum);
|
||||||
fs.mkdirSync(dir, { recursive: true });
|
fs.mkdirSync(dir, { recursive: true });
|
||||||
|
|||||||
+2
-1
@@ -30,7 +30,8 @@ services:
|
|||||||
- MAX_PARALLEL=${MAX_PARALLEL:-2}
|
- MAX_PARALLEL=${MAX_PARALLEL:-2}
|
||||||
command: >
|
command: >
|
||||||
sh -c "
|
sh -c "
|
||||||
apk add --no-cache yt-dlp ffmpeg python3 &&
|
apk add --no-cache ffmpeg python3 py3-pip &&
|
||||||
|
pip3 install -U yt-dlp --break-system-packages &&
|
||||||
npm install express cors &&
|
npm install express cors &&
|
||||||
node novasonic-server.js
|
node novasonic-server.js
|
||||||
"
|
"
|
||||||
Reference in new issue
Block a user