Skip to content

pravussum/lastfm2spotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lastfm2spotify project

Get developer accounts

Extra simple throw-away importer for your last.fm loved favourites as a Spotify playlist. You need Last.fm as well as Spotify developer accounts.

Adapt configuration

Create an 'application.properties' with the corresponding credentials: spotify.clientid= spotify.clientsecret= lastfm.apikey=

Start the application

With the jar+libs when downloaded from the release:

  • extract the release (JAR + lib directory)
  • place the application.properties in a config subdirectory (beside lib)
  • run java -jar lastfm2spotify-1.0-SNAPSHOT-runner.jar

... or ...

In development mode (e.g. from you IDE) mvn quarkus:dev -f pom.xml

Import/Export

Fire up http://localhost:8080/start in a brower to start the Spotify authentication. You will be redirected to the Spotify authentication service where you'll need to approve that the app is allowed to access your Spotify data. Once this is done, you will be redirected to the app (it should report "true" if authentication flow was finished successfully).

Start the import by visiting (replace <last.fm username> and obviously) http://localhost:8080/sync?lastfmuser=<last.fm username>&spotifyuser= e.g. http://localhost:8080/sync?lastfmuser=sherlock&spotifyuser=watson

Notes

Be patient:

  • Due to the fact that last.fm doesn't offer an API method to retrieve all loved tracks ALL tracks need to be scraped page by page.
  • Due to the fact that Spotify doesn't offer an API method for searching multiple tracks at once or adding items to playlists by name, we have to search track by track.

The last.fm request will be sent in parallel. Spotify has a rate limit in place, which will kick in from time to time (already does when importing a few hundred tracks). Requests will be throttled automatically.

TBD

A little front end ;-)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages