Closed aandroide closed 2 years ago
Presumably the extracted artist
value looks the same but isn't identical. Show us examples. Also, extract the artist
value in two cases that cause different directories and pass them into a hex-dump tool.
I created a "test" folder and I created a playlist with only 2 songs to show the error that I want to point out with some artists it works and others not. I attach image of the given command.
and the content is this as you can see it created a "NA" folder
inside the NA folder I have this file note the title and artist are written:
and inside the "max pezzali" folder I have this:
in reality the artist is the same person. why did he create 2 separate folders for me, one of which is named NA? Thanks!!
NA
is the default used when a template field is missing.
Some of your songs are tagged in the site with an artist
and some aren't (or the extractor isn't finding the tag).
The code documentation of artist
says:
The following fields should only be used when the media is a track or a part of
a music album:
...
artist: Artist(s) of the track.
...
So, as a one-step procedure, your plan is doomed. You might be able to use some other tool to extract an artist value from each song that ends up in NA and move and/or re-tag it appropriately. Or perhaps there's some other template value that might be more reliable than artist
but with similar semantics (creator
?). Or investigate the --metadata-from-title
option since you are converting to MP3.
if I use "creator" no folders are created. it would appear that only "artist" creates the folders. or am I wrong?
I guess so. Any output template field will create a directory if used in the directory part of the output filename template, and the directory doesn't already exist. If the field isn't set by the extractor, the directory name will be NA
by default. Apparently creator
isn't extracted for the item that you tested.
You can check if the artist
is set for an item by checking that the output of yt-dl with the options --get-filename -o '%(artist)s' --output-na-placeholder ''
(and the item URL) is not empty. Obviously that idea can be applied to any other template field.
ok thank you for all this information. maybe in the future it would be nice if youtube-dl can do everything automatically if some metadata is missing
If only we knew how to discover metadata that isn't provided! Welcome to the nightmare world of media cataloguing.
Checklist
Question
Hi everyone I'm trying to figure out how youtube-dl to create folders based on artist name and group the tracks found even if the titles change but the alterist is always the same in the same folder. the command i am trying to use is: youtube-dl --download-archive Music/download.txt --no-post-overwrites -ciwx --add-metadata --audio-format mp3 -o "Music/%(artist)s/%(title)s.%(ext)s" https://youtube.com/playlist?list=PLracvmce8hFZcjECC2rlGMxsn1dN_69ql The folders are created but with some titles even if the artist is always the same, the program creates a new folder with a new name.