Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
btTeddy opened this issue Jul 31, 2024 · 4 comments
Assignees

Comments

@btTeddy
Copy link

btTeddy commented Jul 31, 2024

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
Copy link
Owner

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:

  • When a playlist URL is passed to tidal-wave, the first step is to get the playlist ID out of the URL
  • If it matches a regular expression for TIDAL’s playlist ID format, the process continues
  • A call to the TIDAL API endpoint for a playlist’s items returns all of the tracks and/or videos in the playlist
  • I did not want to rewrite the entire downloading logic for playlists as it was already in place for tracks and artists, so each playlist item ID is downloaded using Track or Video, and then at the end, are moved to the Playlists/Playlist Name/ directory in order, as you mentioned

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
Copy link
Author

btTeddy commented Aug 2, 2024

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
Copy link
Owner

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
Copy link
Author

btTeddy commented Aug 13, 2024

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'

@ebb-earl-co ebb-earl-co self-assigned this Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants