kieraneglin / pinchflat

Your next YouTube media manager
GNU Affero General Public License v3.0
1.42k stars 25 forks source link

Download music and sort by album #474

Closed Rom0067 closed 2 weeks ago

Rom0067 commented 2 weeks ago

I'm just getting started with pinchflat and so far its awesome. Thank you! I was wondering if there is a way to download music only playlist and sort them by album. Right now when I download an album I have shared to a playlist pinchflat creates folders with artist name only and it is pretty messy. I attached a picture below because I am not great at explaining things. I apologize in advance.

Screenshot 2024-11-15 101319

So in the picture Gunship is the name of the artist. The album I downloaded is Dark All Day. Right now its only showing the Artists name and creating separate folder for tracks that have supporting artists. Ideally I would love to see a file tree: Gunship/Dark All Day/ Tracks. I understand that might not be possible so I would love to just be able to group downloads by album. Any help would be much appreciated. Again thanks for the app its great!

kieraneglin commented 2 weeks ago

Hey there! Thanks for the suggestion (:

Unfortunately, this is trickier than it might seem since YouTube videos often don't have the correct values set for music-related attributes. This is 100% an issue caused by the video uploaders and not a shortcoming of the underlying downloader that Pinchflat uses (yt-dlp).

You can try setting an output template to something like this: /music/{{ artist_name }}/{{ album }}/{{ title }}.{{ ext }}, but the actual values that come up are totally dependent on what the YouTube uploader added to those fields, if they added anything at all.

I wish I had a better answer for you!

Rom0067 commented 2 weeks ago

Hey there! Thanks for the suggestion (:

Unfortunately, this is trickier than it might seem since YouTube videos often don't have the correct values set for music-related attributes. This is 100% an issue caused by the video uploaders and not a shortcoming of the underlying downloader that Pinchflat uses (yt-dlp).

You can try setting an output template to something like this: /music/{{ artist_name }}/{{ album }}/{{ title }}.{{ ext }}, but the actual values that come up are totally dependent on what the YouTube uploader added to those fields, if they added anything at all.

I wish I had a better answer for you!

Thanks for the reply! Unfortunately before I messaged I did try and add {{ album }} to the output template it didn't works as I would expect. It actually put every song in its own folder: music/Gunship/Woken Furies/Woken Furies.m4a. HOWEVER I did put {{ album }} at the end of the string so I will try your format and see if it makes a difference. Thank you! Either way I'm using the app you can't get rid of me that easy!

Side related question: I'm very new to this but do you know if downloaing NFO fix my issue if I'm using something like Navidrome and an android client like Symfonium?

kieraneglin commented 2 weeks ago

I don't suspect that including NFOs will fix the issue in this case since it's ultimately a limitation of the information that yt-dlp can discern from the video itself.

There is some level of support within yt-dlp for parsing the title of the video and determining the title from that, but doing so is really tricky if the titles are inconsistent. You might be able to get some help in the yt-dlp discord - what you're looking for is to "use --parse-metadata to determine the album name from the video title". Here is some more documentation around that, but this is definitely one of the more technically complex parts of yt-dlp.

If you find something that works, you can use Pinchflat's custom yt-dlp options feature to integrate that change into your downloading workflow, but all this is pretty rough to get working well. If you have the luxury, it might be best to look for alternative ways to download music if your end-goal is to have a consistent directory structure (Deemix comes to mind)

Rom0067 commented 2 weeks ago

I don't suspect that including NFOs will fix the issue in this case since it's ultimately a limitation of the information that yt-dlp can discern from the video itself.

There is some level of support within yt-dlp for parsing the title of the video and determining the title from that, but doing so is really tricky if the titles are inconsistent. You might be able to get some help in the yt-dlp discord - what you're looking for is to "use --parse-metadata to determine the album name from the video title". Here is some more documentation around that, but this is definitely one of the more technically complex parts of yt-dlp.

If you find something that works, you can use Pinchflat's custom yt-dlp options feature to integrate that change into your downloading workflow, but all this is pretty rough to get working well. If you have the luxury, it might be best to look for alternative ways to download music if your end-goal is to have a consistent directory structure (Deemix comes to mind)

Thanks for the info. I will dig into this a little deeper when I have a little more time. Have a good one!