spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.24k stars 1.59k forks source link

Add a way to download song URLs of a playlist #1101

Closed loutr closed 3 years ago

loutr commented 3 years ago

What is the purpose of your issue?

Description

As to version 2.2 of this program, one could retrieve song URLs of a given playlist to a text file using the --playlist parameter, and that is no longer available. Do you have any plan to incorporate this option back? I personally used it in combination with a list of URLs of songs I had already downloaded, to make sure I would not get them twice.

If, for whatever reason, you do not want this option back, could anyone suggest me a (simple) workaround that could fit my use case?

Thank you for the work you have put in this project.

ghost commented 3 years ago

You can use SpotDL as a library.

See the get_playlist_tracks function from spotdl.search.utils.

You can even save the details of the song to disk by writing songObj.get_data_dump and saving the returned dict to file.

This is helpful as you can recreate a songObj from a "dump" via the songObg.from_dump method.

We intend to keep the CLI focused on getting songs. In all likelihood a --playlist won't be e reimplemented as not many users would use that.