FoxxMD / multi-scrobbler

Scrobble plays from multiple sources to multiple clients
https://foxxmd.github.io/multi-scrobbler
MIT License
346 stars 16 forks source link

foorbar2000 as source? #152

Closed b9AcE closed 5 months ago

b9AcE commented 5 months ago

Hi!

I want to use multi-scrobbler to submit to Last.fm, Listenbrainz and Maloja at the same time, with plays submitted by Jellyfin for mobile use and foobar2000 for desktop-computer use (as well as later maybe also Navidrome). I got as far as having fully working Jellyfin submitting via multi-scrobbler to Last.fm, Listenbrainz and Maloja at the same time, but I am having trouble with getting foobar2000 as a source. My thought is/was to use the third-party component foo_listenbrainz2 (compatible with both Listenbrainz and recently also Maloja) with the "API URL" pointing at my multi-scrobbler (docker compose-)service instead, but that requires configuring "CONFIG_DIR/listenbrainz.json" simultaneously as "configureAs" "client" and "source" at the same time presumably with a made up value for "token" (I just incremented my real token-value from the client-configuration by 1).

However, for all the attempts I have done at this multi-scrobbler just gives me errors saying it can not parse the listenbrainz.json file with those changes (again, was working before trying to make it both client and source at the same time; everything still works when I put my previous client-only version of the listenbrainz.json file back but then still without my main music player foobar2000).

So, as I don't know if I am trying to write a configuration that is currently just actually impossible for multi-scrobbler, I thought I would ask those that know, here, if I'm just wasting my time trying to do something impossible. Is what I described currently possible to do? If not, can anyone think of some better/currently workable path to getting foobar2000 and Jellyfin (as well as later maybe also Navidrome) as sources for scrobbles gathered by multi-scrobbler as a concentrator to then simultaneously distribute to Last.fm, Listenbrainz and Maloja?

Thank you!

FoxxMD commented 5 months ago

The listenbrainz functionality for MS works either as:

It currently does not have the functionality to act as a listenbrainz endpoint like Maloja does. However I have a branch to add this functionality in the works and I'll see about getting it finished.

In the mean time you can still achieve your goal by using LZ as a source which submits to LFM and Maloja clients.

1. Use foo_listenbrainz2 normally

Submit scrobbles to the official listenbrainz endpoint so they are scrobbled to your user profile on listenbrainz.org

1. Setup an additional Listenbrainz source

The token will be the same as the client you have already (presumably) setup. An example of listenbrainz.json would be like:

[
  {
    // the client, the name here is what is specified in your jellyfin source under clients
    "name": "lz",
    "configureAs": "client",
    "enable": true,
    "data": {
      "token": "029b081ba-9156-4pe7-88e5-3be671f5ea2b",
      "username": "b9AcE"
    }
  },
  {
    // the source LZ that will pull your scrobbles
    "name": "lzSource",
    "configureAs": "source",
    "enable": true,
    // names of the configured maloja and lastfm clients to scrobble to
    "clients": ["myMaloja","myLastfm"],
    "data": {
      "token": "029b081ba-9156-4pe7-88e5-3be671f5ea2b",
      "username": "b9AcE"
    }
  }
]

MS has duplicate scrobble detection so it should only scrobble tracks from your profile that comes from foobar2000 (it should detect the ones from jellyfin were already scrobbled to lfm and maloja)

b9AcE commented 5 months ago

Excellent reply, @FoxxMD. Thank you! It immediately started working the way I desired. Checked both inputs and all three outputs combinations. Turns out, it is sometimes better to just ask those who are likely to know than to waste hours at something that turns out to be actually impossible at that time. ;-)

Also looking forward to the future added functionality you mentioned, as it seems more like the "proper way" of doing it.