31
submitted 1 year ago* (last edited 1 year ago) by JohnWorks@sh.itjust.works to c/selfhosted@lemmy.world

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 ¯\(ツ)

you are viewing a single comment's thread
view the rest of the comments
[-] Leax@lemmy.dbzer0.com 3 points 1 year ago

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

[-] JohnWorks@sh.itjust.works 7 points 1 year ago

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 3 points 1 year ago
[-] nasi_goreng@piefed.social 3 points 1 year ago

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

[-] lemonySplit@lemmy.ca 3 points 1 year ago

Listenbrainz discover recs are phenomenal

[-] JadedBlueEyes@programming.dev 2 points 1 year ago

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.

this post was submitted on 22 Aug 2025
31 points (100.0% liked)

Selfhosted

62183 readers
812 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS