ebb-earl-co / tidal-wave

Waving at the TIDAL music service
Apache License 2.0
43 stars 2 forks source link

Playlist - download directly to ./Playlists/Playlist_Name/nnn - Track_Title.flac to allow downloading only newly added tracks #191

Open btTeddy opened 3 months ago

btTeddy commented 3 months ago

The default tidal-wave logic for playlists appears to be as described here

Download to ./Artist/Album/nn - Track_Title.flac then move to ./Playlists/Playlist_Name/ and rename to nnn - Track_Title.flac

This works fine up to the point when new tracks are added to the playlist and it's getting downloaded again in tidal-wave, which appears to download all of the tracks once again since they no longer exists in download directory due to being renamed.

Suggested solution: Set the download location and file name to ./Playlists/Playlist_Name/nnn - Track_Title.flac (nnn being order number in playlist) before the download starts. Pretty much like Tidal-Media-Downloader does.

ebb-earl-co commented 3 months ago

Thank you for having posted an issue, @Beersteddy!

I am not quite understanding the situation here and what change you are requesting, so let me expand a bit on the playlist downloading logic:

Are you saying that submitting a playlist URL to TIDAL for the second or third etc. time causes the entire playlist to be downloaded again as it doesn’t check for the existence of the playlist already?

btTeddy commented 3 months ago

Yes. Exactly what's happening.

To test it:

Create new playlist Add 20 tracks Download it Once download finished try to download the same playlist once again. Tidal-wave will download all 20 tracks once again.

BTW. Thanks for the great app. Really like that it grabs replygain tags as well, which the 'original' downloader doesn't.

ebb-earl-co commented 3 months ago

Great to hear that you find it useful!

Okay, checking for the existence of the playlist isn’t as straightforward, because of the —no-flatten flag that was requested some time ago. My first instinct is to check if every track/video from the playlist is I already on disk, and if not, download all again.

That would be simplest and easiest to implement, but not best. Ideally, every 1, …, N items in the playlist would be checked for being present and only the missing ones would be retrieved.

There are some wrinkles here with playlists changing, and failed downloads due to whatever reason, so what are your thoughts?

btTeddy commented 3 months ago

Honestly, whichever options that prevents re-downloadong and is easiest to implement.

Maybe worth checking how the original downloader deals with it as it seems to be directly naming files '001. Title. Flac'