Spotify to subsonic Playlist Generator and Importer
Since I haven't found an app to import my Spotify playlists, I started this project for myself, but then decided that this could be helpful for the community.
!!! WORK IN PROGRESS !!!
Note that this is a work in progress, some things may be subject to changes. Like endpoints paths.
The current release has all the base features, but it is still a work in progress, so expect bugs.
Simple playlist generator based on spotify user and artists recommendations with Subsonic API support
This software will try to match all your Spotify playlists to your music library using Subsonic APIs
This generator works with Navidrome and every Subsonic API enabled media center
This is an example about what it generates using Navidrome:
For install instructions take a look at the WIKI: https://github.com/blastbeng/spotisub/wiki
Take a look at Spotdl here: https://github.com/spotDL/spotify-downloader
Take a look at Lidarr here: https://github.com/Lidarr/Lidarr
When both Spotdl and Lidarr integrations are enabled, if spotisub doesn't find a song in subsonic database, it tries to search the artist returned from the spotify APIs inside the Lidarr database (via Lidarr APIs). If this artist isn't found inside the Lidarr database, the download process is skipped.
So for example if you want to automate the download process, using this system you can skip the artists you don't like.
The track matching is made in two different ways, by ISRC comparison and simple text comparison.
For perfect track match by ISRC it is important that the songs in your library have the musicBrainzId tag.
The ISRC is univoque for song, read more about it on ISRC - MusicBrainz
In case the song found in your library has a musicBrainzId tag, it will be used to retrieve the ISRC from Musicbrainz Database.
This ISRC will then be compared with the Spotify song ISRC (if present).
If these two ISRC matches, the song will be added to the playlist and the text comparison will be skipped.
When the two ISRCs doesn't match, the text comparison will be executed between the Subsonic found song and Spotify song.
In case of successfull compare, the song will be added to the playlist.
Spotisub supports word exclusions, via the environment variable EXCLUDED_WORDS as documented in Environment Variables
But the exclusions are only made in case of text comparison.
If there is an ISRC match, Spotisub will just use this song without doing excluded words checks.
This is because, for example, if we want to exclude the word "live" from Subsonic searches, but in our Spotify playlist we have a song with "live" in it that matches by ISRC a song in our Subsonic library.
In this case, that song should not be skipped and the correct way of making it not being added to the Subsonic playlist is to manually remove it from the Spotify playlist.
In case of playlist generated by recommendation, well, Spotify doesn't add things like "live" or "instrumental" or "demo" to their recommendation playlists.
Same thing for artists top tracks playlists.
Dashboard
NOTE. Depending on your library size and your playlists number and size on Spotify, the execution may take a very long time. To avoid Spotify rate limiting a lot of time.sleep() have ben added to the code.
Official Spotisub communities
A big thanks to the developers and maintaners of these libraries\softwares: