Showing results for 
Search instead for 
Do you mean 
Reply
Music Lover
Kasreyn
Posts: 2
Registered: ‎15-06-2012

Re: Can I print out my Spotify playlists?

Don't know about you guys, but I always add album as new playlist. I appreciate radio but listening to a whole album has it's own charm.

 

So the playlists (not necessarily the tracks) is sort of a backlog / history I want to safe keep somewhere outside of Spotify. 

 

And it seems the reason we can't export delimited text, XML or similar is purely political. It's certainly nowhere to be found in the official clients. I've looked through the APIs (which seems to be improving), nothing stands out that would support such a feature. 

 

Attached at the bottom is the source code for a program that can parse and print the "playlist.bnk" file. I assumed the format is not publicly known (though not hard to guess). Can we have specifications please?

 

It needs to be improved upon, it doesn't quite catch all of my playlists.

 

For *nix "playlist.bnk" is located in ~/.config/spotify/Users/name/playlist.bnk

 

http://community.spotify.com/t5/Spotify-Ideas/Backup-playlists/idi-p/5413 says the location on windows is <USER_APP_DATA>/Spotify/Users/  

 

Place playlist.bnk in the same directory, compile and run.

 

Example: g++ -o spotify_playlist_decoder spotify_playlist_decoder.cpp ; ./spotify_playlist_decoder



 

#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
 
int main(int argc, char *argv[]) {
    std::vector<char> vbuf;
    unsigned int len;
    std::vector<char>::iterator bpos,dpos,epos;
 
    std::ifstream in("playlist.bnk", std::ios::in|std::ios::binary);
    if (in) {
        in.seekg(0,std::ios::end);
        len = in.tellg();
        vbuf.resize(len);
        in.seekg(0,std::ios::beg);
        in.read(&vbuf[0],len);
 
        for(std::vector<char>::iterator it = vbuf.begin(); it != vbuf.end(); ++it) {
            if (*it == (char)0x02 && *(it+1) == (char)0x09) {
                bpos = it+3;
            }                                                                                          
            if (*it == (char)0xE2 && *(it+1) == (char)0x80 && *(it+2) == (char)0x93 && bpos != vbuf.end()) {
                dpos = it;
            }                                                                                          
            if (*it == (char)0x18 && *(it+1) == (char)0x01 && *(it+2) == (char)0x19 && dpos != vbuf.end()) {
                epos = it;
            }                                                                   
            if (bpos != vbuf.end() && dpos != vbuf.end() && epos != vbuf.end()) {
                for(std::vector<char>::iterator it2 = bpos; it2 < dpos; ++it2) {
                    std::cout << *it2;
                }                                                              
                for(std::vector<char>::iterator it2 = dpos; it2 < epos; ++it2) {
                    std::cout << *it2;
                }
                std::cout << std::endl;
                bpos = vbuf.end();
                dpos = vbuf.end();
                epos = vbuf.end();
            }
        }
    }
}
Concert VIP
geted
Posts: 8
Registered: ‎14-08-2012

Re: Can I print out my Spotify playlists?

Hi,

 

I developed, a new app last week to export some playlists on flat file (CSV); then you can read it by Excel for example.

You'll find more details here: export to text

So, it's in french but you just have to download the zip file, unzip it to your <My documents>/Spotify, run Spotify and execute this command: spotify:app:exportcsv
.

 

That's it.

Music Lover
Kasreyn
Posts: 2
Registered: ‎15-06-2012

Re: Can I print out my Spotify playlists?

Thanks geted ! that's really neat. Will try it out when I get home :)

 

 

Music Lover
perzik
Posts: 2
Registered: ‎04-11-2012

Re: Can I print out my Spotify playlists?

[ Edited ]

The http link method does no longer work, atleast not as described :(

Music Fan
tmann619
Posts: 1
Registered: ‎18-12-2012

Re: Can I print out my Spotify playlists?

[ Edited ]
 
Radio Star
AbsolutelyNoFB
Posts: 635
Registered: ‎19-09-2012

Re: Can I print out my Spotify playlists?

This method still works, but is really only good for doing a few playlists as it would get a bit tedious if a person had many playlists.

 

To export a playlist as "just text", do the following:

 

1. Click on the playlist

2. Click on a song in the playlist

3. Type Ctrl-A to select all the songs in the playlist

4. Type Ctrl-C to copy all the songs to the clipboard

5. Paste into Microsoft Word using Ctrl-V.

6. Highlight everything you pasted in MS Word using Ctrl-A

7. Type Ctrl-Shift-F9 to remove all the hyperlinks.

8. You will have an all text playlist that is the the format of "artist - song name". Nothing fancy, but often good enough.

 

You may be able to use something other than Microsoft Word. Perhaps even GMail or GDocs.

 

Music Fan
kodok
Posts: 1
Registered: ‎12-05-2013

Re: Can I print out my Spotify playlists?

Any way to also export the time and album columns?

Award Winning Artist
hpguru
Posts: 5,505
Registered: ‎06-02-2012

Re: Can I print out my Spotify playlists?

There is no way to export other columns.

Spotify for music listening, user since April 2009. Netflix for movie watching, user since July 2013. 100M/5M cable modem and 50M/25M mobile network. Pimp your life with streaming everywhere!
Garage Band
treap
Posts: 62
Registered: ‎12-03-2013

Re: Can I print out my Spotify playlists?

[ Edited ]

You could utilize libspotify to fetch all metadata.

 

You can iterate through a playlist, fetch the track info:

 

https://developer.spotify.com/technologies/libspotify/docs/12.1.45/group__types.html#ga47bbd2262f0c8...

 

They have a sample program to (almost) do this, so it shouldn't be too hard to do.

 

Pulled up the sampe: https://developer.spotify.com/technologies/libspotify/docs/12.1.45/jukebox_8c-example.html

 

Getting track metadata from handle: https://developer.spotify.com/technologies/libspotify/docs/12.1.45/group__track.html

Music Lover
isabeau
Posts: 2
Registered: ‎09-07-2013

Re: Can I print out my Spotify playlists?

hai

i've tried all those solutions but i still cannot copy a playlist from spotify to word so can anyone give me an answer that also does work in reality? thnx.

Announcements


Want to be a Rock Star?
Read about our Rock Star Program.
If you'd like to join, please make sure you read the attached pdf file and fill out this form:
Please log in (or register) to see the link.

Did you know?


More

Please bear in mind that the Community is not an official Spotify support service. It's a place where we all help each other, whether we work for Spotify or not. So please use your discretion when using the forum.