nathom / streamrip

A scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer
GNU General Public License v3.0
2.6k stars 228 forks source link

[FEATURE] Better playlist and file management #603

Open slanglade opened 8 months ago

slanglade commented 8 months ago

Is the feature request related to a problem. Please describe it.

Tracks are downloaded in subfolder automatically created according to playlist name. But different playlist can have the same name ("Loved Tracks" from multiple profiles/owner), and can share tracks.

Describe the solution you would like.

I would like to have the ability to have all files download in a "flat" folder, without per playlist subfolder. This way, multiple playlist with common tracks will all be stored in the same folder.

In order for this to be useful, I would also like to have playlist file (m3u8 format) created with the track list. And to be able to use additionnal metadata available for track & playlist filenames (ex: playlist owner, but also album title at the track level)

This way, I could construct a fully functionnal automatic playlist download, to be exploited by Navidrome for instance.

Describe alternatives you've considered.

Deemix is able to do this at the GUI level, but is not able to automate this task.

slanglade commented 8 months ago

A useful alternative would be to have tracks downloaded within album folders (using tags) and not in playlist folder, and have a .m3u8 file created using owner + playlist title (or other combination of metadata) as filename.

nathom commented 8 months ago

Would putting the username in the playlist folder fix the issue?

slanglade commented 8 months ago

No, I really need the playlist owner. My specific use-case : I've got a family account (without dedicated accounts for each member), with many playlist owned by different members, and I can access all of them with my current account. Ideally I want to be able to download with folders name with artist, then album, then track. So when multiple playlist are ripped, tracks are extracted only once, and a playlist file will hold the track list. And multiples playlist can have common tracks without problem. Given that Navidrome is able to use the m3u8 files, this way I can have a carbon copy of playlists, synced every day from Deezer and accessible from Navidrome or any other subsonic compatible app.

slanglade commented 8 months ago

I'm trying to play with streamrip code, but I realize the playlist owner is not something common to all source providers. Soundcloud doesn't provide username, only userid. And I'm new to Python and VSCode, so I'm progressing slooooooowly. With one or two extra parameters in config, and extra keywords extracted from API, I guess I could get something working. I'll keep you informed if I get something useable.

slanglade commented 7 months ago

I've done a first version of playlist m3u8 file generation, with name and owner as keywords. And track pattern that can contain subfolders.

It works rather well for deezer, except for playlist file that is only "additive", I didn't find an easy way to deal with cache database.

@nathom , do you want me to contribute and push the branch I've created ? Warning, it may need polish 😀