Headphones Spotifty Import
Notice: Due to the fact that Headphones relies on Musicbrainz to find information (artists, albums) we cannot garuntee that a song will be added to Headphones because of disparities between Spotify and Musicbrainz databases. Such as Spotify may have an album but Musibrainz may not but rather have only 2x songs from that album as singles.
Prerequisites:
- Exportify CSV file named all.csv (https://rawgit.com/watsonbox/exportify/master/exportify.html)
- Headphones with enabled API (Settings>Web Interface>API>Enable API) (https://github.com/rembo10/headphones)
- Python (Hasn't been tested on any version lower than 3.62) (https://www.python.org/)
- Python Requests (May require pip to install on windows, setup is easiest on linux in my opinion.) (http://docs.python-requests.org/en/master/user/install/))
- Colorama Python package. (pip install colorama) https://pypi.python.org/pypi/colorama
Instructions:
- Open Spotify (I used the desktop client) and create a new playlist with all the music you want to download. I went into "Songs" (Spotify>Songs) and selected everything with Ctrl+A then dragged the selection to the playlist in the sidebar.
- Open your web browser and go to https://rawgit.com/watsonbox/exportify/master/exportify.html. Log in with your Spotify account and click export on your desired playlist.
- Move the .csv file that you just downloaded to the same folder as importer.py and make sure it's named "all.csv"
- Download and install Python, and Python Requests from the links in Prerequisites.
- Install Headphones on whatever device you like, as long as it's on the same network as you are running the script on. If Headphones seemingly hasnt installed correctly and the webpage won't load you may need to edit the "config.ini" and change the host gateway (or whatever it's called.) from "localhost" to "0.0.0.0". This allows for headphones to run and be accessable on the network rather than just the local machine.
- Setup Headphones. Go into the settings and configure your download settings, search provider settings, quality settings, etc...
- Enable the API on Headphones. Go to Settings>Web Interface and enable the API.
- Generate an API key from above webpage. And set your host and api key below.
- You may need to use a Mirror domain for Musicbrainz if the musicbrainz searching is taking extended periods of time. If this is the case you can change it via Settings>Advanced Settings. I use the folling settings: Musicbrainz Mirror: Custom | Host: musicbrainz-mirror.eu | Port: 5000 | Required Authentication: No (unchecked) | Sleep Interval: 1
- Am I missing anything? Lol. Don't think so. Let me know if you need help though.
- Open terminal/command-line and navigate to the folder where all.csv and inporter.py are located.
- Run this file. (importer.py)
- Wait. It may take a really long time to complete the script, depending on your music library size.