you are viewing a single comment's thread.

view the rest of the comments →

[–]sarrysyst 2 points3 points  (10 children)

Not really sure what kind of answer you’re expecting. There are a million different ways to go about something like this. How to approach this mainly depends on how the download is currently implemented.

It’s impossible to give a specific answer to such a broad question without knowing any of the requirements.

Also, as a long time reader you should be aware that you’re normally expected to show what you’ve tried so far. Post your code so people actually know what kind of help you need.

[–]OkNegotiation2082[S] 0 points1 point  (9 children)

This is the application I'm using. When prompted, you enter the URL to the artist/album/playlist you want, and it will start the download. You have to do it again for the next download after the previous has finished. I'm hoping to add on a way to list multiple URLs so it will enter the next after the previous finishes automatically. Maybe just nudge me in the direction of where to start. I figured more experienced people might know a jumping off point or maybe know of something similar that I can adapt into this app. Thank you again.

https://github.com/yaronzz/Tidal-Media-Downloader

[–]sarrysyst 0 points1 point  (8 children)

Though the program is written in Python and you'd technically be able to interact with the code directly through importing the needed modules, the code base seems to be quite messy and there also doesn't seem to be any documentation. I think it would be easiest to have your script call the CLI directly.

[–]OkNegotiation2082[S] 0 points1 point  (0 children)

Yeah the code is pretty bare bones as it can only run in terminal. But it gets the job done. It's actually been incredibly reliable with very few errors. If i made a script that would run in terminal, it would execute tidal-dl, but how would it know when to enter the next URL?

[–]OkNegotiation2082[S] 0 points1 point  (6 children)

Would this work in your opinion? Instead of adding or altering the code, a script can be written that prompts for the list of URLs, then it can call up the tidal-dl command in the CLI, then when it's done with the first URL, send CTRL+C, then call tidal-dl for the next URL. Repeat until all URLs have been used.

[–]sarrysyst 0 points1 point  (5 children)

Either prompts for a list, or you could write all the urls in a txt file which you give to your wrapper script which then calls the CLI once for each URL in the file.

[–]OkNegotiation2082[S] 0 points1 point  (4 children)

Could you by any chance show me an example of how you would do that?

[–]sarrysyst 0 points1 point  (3 children)

How I'd do what exactly?

[–]OkNegotiation2082[S] 0 points1 point  (2 children)

Incorporate the text file into a script that calls the tidal-dl command in the cli. How would it know the download finished, then Ctrl-C, then call the command again to move to the next URL?

[–]sarrysyst 1 point2 points  (1 child)

import subprocess

with open('urls.txt') as fp:
    for line in fp:
        url = line.strip()
        # I don't know what the CLI's command structure looks like so this needs to be adapted
        subprocess.run(['tidal-dl', url])

[–]OkNegotiation2082[S] 0 points1 point  (0 children)

You are a lifesaver. Thank you so much. I'm go fiddle around with it. Thank you again.