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

Listenbrainz not logging scrobbles from webscrobbler. #113

Closed undaunt closed 6 months ago

undaunt commented 10 months ago

Describe the bug When I listen to a track on, for example, Marvis Pro on iOS (Apple Music), I scrobble it to last.fm, and the last.fm source pushes it properly to my non-last.fm clients as configured: Maloja and Listenbrainz. However, when listening to a track via webscrobbler, it should be going to all clients, and it does in the clients, but logs do not show it was scrobbled to Listenbrainz.

To be clear, Listenbrainz is showing the scrobbled track, but multi-scrobbler isn't showing it on scrobbled?type=listenbrainz&name=ListenBrainz or in the logs.

Expected behavior Tracks should show being scrobbled to clients, show in the 'tracks scrobbled' page, and show within the client website on Listenbrainz.

Logs

Last.fm source scrobble

2023-11-30T16:47:32-08:00 info    : [Scrobblers] [Listenbrainz - ListenBrainz] Scrobbled (Backlog) => (Lastfm) Taylor Swift - Look What You Made Me Do @ 2023-11-30T16:47:20-08:00
2023-11-30T16:47:28-08:00 info    : [Scrobblers] [Maloja - Maloja] Scrobbled (Backlog)     => (Lastfm) Taylor Swift - Look What You Made Me Do @ 2023-11-30T16:47:20-08:00
2023-11-30T16:47:27-08:00 info    : [Sources] [Lastfm - Source] Discovered => Taylor Swift - Look What You Made Me Do @ 2023-11-30T16:47:20-08:00

Webscrobbler source scrobble

2023-11-30T16:41:50-08:00 info    : [Sources] [Lastfm - Source] Discovered => Deep Purple - Smoke on the Water @ 2023-11-30T16:38:54-08:00
2023-11-30T16:41:48-08:00 info    : [Scrobblers] [Lastfm - LastFM] Scrobbled (Backlog) => (undefined) Deep Purple - Smoke on the Water @ 2023-11-30T16:38:54-08:00
2023-11-30T16:41:46-08:00 info    : [Scrobblers] [Maloja - Maloja] Scrobbled (Backlog)     => (undefined) Deep Purple - Smoke on the Water @ 2023-11-30T16:38:54-08:00
2023-11-30T16:41:45-08:00 info    : [Sources] [Webscrobbler - WebScrobble] Discovered => Deep Purple - Smoke on the Water @ 2023-11-30T16:38:54-08:0

Full Config

{
  "sourceDefaults": {
    "maxPollRetries": 0,
    "maxRequestRetries": 1,
    "retryMultiplier": 1.5
  },
  "clientDefaults": {
    "maxRequestRetries": 1,
    "retryMultiplier": 1.5
  },
  "sources": [
    {
      "type": "lastfm",
      "name": "Source",
      "configureAs": "source",
      "clients": ["Maloja","ListenBrainz"],
      "data": {
        "apiKey": "x",
        "secret": "x",
        "redirectUri": "http://10.0.20.15:9078/lastfm/callback"
      }
    },
    {
      "type": "plex",
      "name": "Plex",
      "clients": [],
      "data": {
        "user": ["me"],
        "libraries": ["music"],
        "servers": []
      }
    },
    {
      "type": "webscrobbler",
      "name": "WebScrobble",
      "slug": null,
      "clients": [],
      "data": {
        "whitelist": [],
        "blacklist": []
      }
    },
    {
      "type": "subsonic",
      "name": "Navidrome",
      "clients": ["LastFM","ListenBrainz"],
      "data": {
        "url": "http://navidrome:4533",
        "user": "me",
        "password": "x",
      }
    },
    {
      "type": "spotify",
      "name": "Free",
      "clients": [],
      "data": {
        "clientId": "x",
        "clientSecret": "x",
        "redirectUri": "http://10.0.20.15:9078/callback",
        "interval": 60
      }
    }
  ],
  "clients": [
    {
      "type": "maloja",
      "name": "Maloja",
      "data": {
        "url": "http://maloja:42010",
        "apiKey": "x"
      }
    },
    {
      "type": "listenbrainz",
      "name": "ListenBrainz",
      "configureAs": "client",
      "data": {
        "token": "x",
        "username": "me"
      }
    },
    {
      "type": "lastfm",
      "name": "LastFM",
      "configureAs": "client",
      "data": {
        "apiKey": "x",
        "secret": "x",
        "redirectUri": "http://10.0.20.15:9078/lastfm/callback"
      }
    }
  ],
  "webhooks": [
  ]
}

Versions (please complete the following information): Provide version information for any related sources/clients.

Additional context There is also a second push from last.fm server after last.fm client is scrobbled to from any other source, but it doesn't appear to be getting duplicated into Maloja or Listenbrainz, so that seems ok.

FoxxMD commented 10 months ago

Are the tracks being scrobbled from WS also being scrobbled from LastFM or another source? MS does not scrobble duplicates. If more than one source is scrobbling the same track the scrobble client should only scrobble it once.

You can get more visiblity into the scrobble duplication check process by turning on some debugging options and debug logging:

{
  "type": "listenbrainz",
  "name": "ListenBrainz",
  "configureAs": "client",
  "data": {
    "token": "x",
    "username": "me",
    "options": {
      "verbose": {
        "match": {
          "onNoMatch": true,
          "confidenceBreakdown": true
        }
      }
    }
  }
}

Set the docker env LOG_LEVEL=debug

FoxxMD commented 6 months ago

If you are still experiencing this issue and can reproduce with the modified settings I mentioned above please let me know and I will re-open.