36
submitted 8 months ago* (last edited 8 months ago) by Anonymous_TorPerson@lemmy.ml to c/piracy@lemmy.dbzer0.com

[SOLVED] Solution: https://lemmy.ml/comment/4317564


edit: Why are you booing me? This is c/piracy

I am doing all of this using ChatGPT, I know enough bash to understand the script partially, but not enough to write the script myself.

I recently posted bash script(click) to download songs on spotify using Spotdl Updated Post

This is all good, but I am not trying to download whole playlists and I want to make sure to

  1. Not download any songs multiple times by comparing the files you are trying to download with the songs you have downloaded already.
  2. Add the songs' URL to the Archieve_file so it doesn't download it again. i.e., compare and if present, exit loop, if not present in file, download and add link to the file.

This was easier when I was dealing with only song links and not playlist links. But now, playlists complicates the equation, but if I can achieve this, I can basically add this script to crontab and make sure I always have a local copy of the songs in my playlist and these playlists would be checked regularly for new downloads and new songs would be downloaded. This is really cool!

Now, the complications I am facing, I don't know how to get the URLs of the spotify songs out of spotify playlists using spotdl or any cli package. If I can do this then, I can make the script go through each link clean the link of unncessary attributes and then download it or if it's downloaded already, move on to the next song.

Now, I don't know how to do it. It would be very helpful if you guys could share any scripts that you have which will achieve this effect or help me get the song URL's from a playlist using a cli package.

PS: I might need some time to reply, I might sleep rn Thank you for your help!

top 5 comments
sorted by: hot top controversial new old
[-] LazerDickMcCheese@sh.itjust.works 9 points 8 months ago

I don't understand why people dislike this post either. I'm not interested in Spotify at all, but this seems like a reasonable question. Maybe I'm missing something?

[-] Fermiverse@feddit.de 5 points 8 months ago

After all thats Reddi.... oh wait,. ....... never mind

¯_(ツ)_/¯

[-] stmcld@lemmy.dbzer0.com 7 points 8 months ago
[-] Thisismyusername169@lemmy.one 3 points 8 months ago
[-] safesyrup@feddit.ch 3 points 8 months ago

You could access the spotify api to get all spotify song links from a playlist and then run the script for each od those. Seems complicated to me though, maybe someone knows better.

this post was submitted on 29 Sep 2023
36 points (87.5% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

52019 readers
710 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others

5. Don't post questions already answered. Read the wiki



Loot, Pillage, & Plunder


💰 Please help cover server costs.

Ko-FiLiberapay


founded 11 months ago
MODERATORS