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.14k stars 1.57k forks source link

[option] provide a way to number tracks from playlist #599

Closed arthurlutz closed 3 years ago

arthurlutz commented 5 years ago

What is the purpose of your issue?

Description

It would be nice to keep the order of a playlist when downloading it offline (similar need than #598 ), one solution (that works for some players) would be to prepend the filenames with the number of the track in the playlist.

For a playlist :

Def
Abc
Ghi

Current is :

* Abc.mp3
* Def.mp3
* Ghi.mp3

With the option :

* 01 - Def.mp3
* 02 - Abc.mp3
* 03 - Ghi.mp3
ghost commented 3 years ago

Good idea. Great one infact. Could you add this to new Features issue?

ghost commented 3 years ago

Good idea. Great one infact. Could you add this to new Features issue?

Maybe open a PR. That should be an easy job on v3. If your working on it, let me know. I'll keep looking through you're code during dev to keep it inline with our design principles.

ghost commented 3 years ago

Hey, I ain't so sure about the m3u8 thing. Could you walk me through how playlists are made

alpsayin commented 3 years ago

I'm only seeing this now, nice to see it under-consideration. Please check out #933. I also had it for v2 in #622.

Silverarmor commented 3 years ago

https://github.com/spotDL/spotify-downloader/issues/867#issuecomment-739237617

This is kinda what I'm working on atm. My idea is that when you download a spotify playlist, a .m3u is also created for all the songs you downloaded.

Hey, I ain't so sure about the m3u8 thing. Could you walk me through how playlists are made

@Mikhail-Zex Basically, a .m3u is a playlist file format for playlists. It is a text file, and can be opened in VLC/most media apps. An example below:

Adele - Hello.mp3
Justin Bieber - Sorry.mp3

In this case, the file names are relative to the .m3u file, so the .m3u must be placed in the same directory as the actual song files. To be clear, the .m3u holds no song data, and only the locations for songs in a playlist.

I've started to see the interaction between spotify, python & .m3u files in my repo here

Over this christmas/new years break, I hope to make a PR where there a way to create the .m3u when downloading a playlist with spotdl.

Sorry if this explanation is a bit weirdly worded, I'm not the best haha.

ghost commented 3 years ago

Chill. Open a draft PR as soon as you start.

stale[bot] commented 3 years ago

This issue has been automatically marked stale because there hasn't been any activity for the last 30 days.

Silverarmor commented 3 years ago

Coming soon in #1154

stale[bot] commented 3 years ago

This issue has been automatically marked stale because there hasn't been any activity for the last 30 days.

Maurits2014 commented 2 years ago

What worked for me was using MP3tag to convert the id3 track number into appending that same number at the start of the filename. In other words, the track number is likely already embedded in the id3 metadata.

xnetcat commented 2 years ago

What worked for me was using MP3tag to convert the id3 track number into appending that same number at the start of the filename. In other words, the track number is likely already embedded in the id3 metadata.

Since V4 you can include the list position in the file name

https://spotdl.readthedocs.io/en/latest/usage/#cli-command-line-interface

Check --output option in the docs link above