Spotify Listenbrainz Import (stuts.uk)
from JohnWorks@sh.itjust.works to selfhosted@lemmy.world on 22 Aug 18:21
https://sh.itjust.works/post/44606312

If you’ve been wanting to get scrobbling history and recommendations similar to spotify without having to be subbed to spotify you can go about this process to get your spotify listening history imported into Listenbrainz.

Listenbrainz does have a settings page to import spotify history but it is not implemented yet so this process can be used to import now. I went through and was able to get my listening history imported over although I needed to update the script that filters out skipped songs. You’d need to update the X to however many json files spotify gives you for your listening history and then also update the start date to your first listen on your current listenbrainz history.

#!/bin/bash

MIN_DURATION=30000

START_DATE="YYYY-MM-DDTHH:MM:SS"


for i in {0..X}; do
    input_file="parsed_endsong_$i.json"

    output_file="filtered_endsong_$i.jsonl"

    elbisaur parse "$input_file" \
        --filter "skipped!=1&&duration_ms>=$MIN_DURATION" \
        -b "$START_DATE" \
        "$output_file"
    fi
done

Or make your own script that’ll work better or maybe the one listed in the article works for you ¯\(ツ)

#selfhosted

threaded - newest

Leax@lemmy.dbzer0.com on 22 Aug 18:47 collapse

That sounds pretty cool! Could you give a bit more info about Listenbrainz please?

JohnWorks@sh.itjust.works on 22 Aug 19:46 next collapse

It’s kinda like an open source version of last.fm scrobbling. One feature they have that I was interested in was the weekly discover playlist.

Leax@lemmy.dbzer0.com on 22 Aug 20:22 next collapse

Nice to know cheers!

nasi_goreng@piefed.social on 23 Aug 18:58 collapse

It also support multi-artist tracking, which Last.fm can't do.

lemonySplit@lemmy.ca on 23 Aug 20:40 collapse

Listenbrainz discover recs are phenomenal

JadedBlueEyes@programming.dev on 23 Aug 20:16 collapse

Basically: record every song you listen to, and when you listen to it (plus some more metadata), and then add it to a giant public dataset. Open source software then uses that to make music recommendations based on your and other people’s listening, and to give you interesting stats about your listening.