diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | index.js | 4 | ||||
-rw-r--r-- | package.json | 2 |
3 files changed, 5 insertions, 3 deletions
@@ -29,7 +29,7 @@ On POSIX systems (Linux, macOS, *BSD, ...): ./youtoo <your YouTube playlist ID> [album name] ``` -> Argument `[album name]` is optional. If used, YouToo will make it so that all the songs belong to the same album rather than the auto-detected albums. Useful to keep playlists organized. +> Argument `[album name]` is optional. If used, YouToo will make it so that all the songs belong to the same album rather than the auto-detected albums. Useful to keep playlists organized. To preserve compatibility with Plex (and some other media players), enabling this option will disable album art. After running this command (and after waiting while it runs), you get the final audio files in `./_youtoo/Result`, it is suggested that you keep these here for syncing to work (e.g. use a symbolic link). @@ -102,7 +102,9 @@ exec("magick", [ "-define", "jpeg:size=1024x1024", "./_youtoo/_audio.webp", "-thumbnail", "512x512^", "-gravity", "center", "-extent", "512x512", "./_youtoo/_audio.jpg" ]); console.log("[" + song + "] Processing audio..."); exec("ffmpeg", [ "-y", "-i", "./_youtoo/_audio.m4a", "-metadata", "artist=" + rmeta.artists.join(", ") + "", "-metadata", "title=" + rmeta.title, "-metadata", "album=" + rmeta.album, "-metadata", "publisher=YouTube", "-metadata", "copyright=© " + rmeta.date.toString() + " " + rmeta.artists[0], "-metadata", "date=" + rmeta.date.toString(), "-metadata", "lyrics=" + lyrics, "-metadata", "encoded_by=" + require('./package.json').name + "/" + require('./package.json').version, "./_youtoo/_audio.1.mp3" ], { stdio: "inherit" }); - exec("ffmpeg", [ "-y", "-i", "./_youtoo/_audio.1.mp3", "-i", "./_youtoo/_audio.jpg", "-map", "0:0", "-map", "1:0", "-c", "copy", "-id3v2_version", "3", "-metadata:s:v", "title=Album cover", "-metadata:s:v", "comment=Cover (front)", "./_youtoo/_audio.mp3" ], { stdio: "inherit" }); + if (!overrideAlbum) { + exec("ffmpeg", [ "-y", "-i", "./_youtoo/_audio.1.mp3", "-i", "./_youtoo/_audio.jpg", "-map", "0:0", "-map", "1:0", "-c", "copy", "-id3v2_version", "3", "-metadata:s:v", "title=Album cover", "-metadata:s:v", "comment=Cover (front)", "./_youtoo/_audio.mp3" ], { stdio: "inherit" }); + } fs.renameSync("./_youtoo/_audio.mp3", "./_youtoo/Result/" + song + ".mp3"); fs.renameSync("./_youtoo/_audio.jpg", "./_youtoo/AlbumArts/" + song + ".jpg"); console.log("[" + song + "] Cleaning up..."); diff --git a/package.json b/package.json index c3e3eca..48d3555 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "youtoo", - "version": "1.2.26", + "version": "1.2.27", "description": "A program that downloads, sorts and names music from YouTube", "main": "index.js", "scripts": { |