FoxxMD / multi-scrobbler

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

Plex not scrobbling, other sources (jellyfin) working fine #89

Closed captainnapalm closed 11 months ago

captainnapalm commented 11 months ago

Describe the bug Playing music through either plexamp or Plex Web, multi-scrobbler is not scrobbling anything to any clients (not just last.fm). I have maloja, listenbrainz and last.fm configured, and multi-scrobbler is showing a Will not scrobble event because it is not media.scrobble error in the logs. This seems to have changed overnight as scrobbles were working from Plex as recently as last night. As far as I can tell, no updates to either service (Plex, Multi-scrobbler) updated in between. Logs below are before LOG_LEVEL=debug was set. I will re-run and add a comment with this set and add the logs.

To Reproduce Steps to reproduce the behavior:

  1. Play music in Plex
  2. Multi-scrobbler UI does not show any activity
  3. Docker logs show error as described above and in the logs below
  4. Try music in another Source (i.e. Jellyfin) and all works fine.

Expected behavior Play music in Plex, see activity in multi-scrobbler and scrobbles sent to all clients configured.

Logs If possible reproduce the issue with debug logging ON

multi-scrobbler    | 2023-07-23T17:12:55.950181378Z 2023-07-23T11:12:55-06:00 info    : [Ingress] [Jellyfin] Received request from a new remote address: ::ffff:172.18.0.1 (UA: Jellyfin-Server/10.8.10)
multi-scrobbler    | 2023-07-23T17:12:56.089871063Z 2023-07-23T11:12:56-06:00 info    : [Ingress] [Jellyfin] ::ffff:172.18.0.1 (UA: Jellyfin-Server/10.8.10) Received valid data from server Jellymusic (Version 10.8.10) for the first time.
multi-scrobbler    | 2023-07-23T17:12:56.100700572Z 2023-07-23T11:12:56-06:00 debug   : [Sources] [Jellyfin - jellymusic] [Platform TW96aWxsYS-Firefox] No prior candidate recent plays!
multi-scrobbler    | 2023-07-23T17:12:56.100859482Z 2023-07-23T11:12:56-06:00 debug   : [Sources] [Jellyfin - jellymusic] [Platform TW96aWxsYS-Firefox] Adding new locked play: (c12f55ad3ed5ec68ee884b27b796b1e8) For Giants - Maru
multi-scrobbler    | 2023-07-23T17:13:26.662753344Z 2023-07-23T11:13:26-06:00 debug   : [Sources] [Jellyfin - jellymusic] [Platform TW96aWxsYS-Firefox] (Stateful Play) (c12f55ad3ed5ec68ee884b27b796b1e8) For Giants - Maru added after met thresholds with tracked time of 30s (wanted 30s) and not matching any prior plays
multi-scrobbler    | 2023-07-23T17:13:26.662873140Z 2023-07-23T11:13:26-06:00 info    : [Sources] [Jellyfin - jellymusic] Discovered => For Giants - Maru @ 2023-07-23T11:12:56-06:00
multi-scrobbler    | 2023-07-23T17:13:26.663243328Z 2023-07-23T11:13:26-06:00 debug   : [Scrobblers] [Maloja - Maloja] Refreshing recent scrobbles
multi-scrobbler    | 2023-07-23T17:13:29.936520441Z 2023-07-23T11:13:29-06:00 debug   : [Scrobblers] [Maloja - Maloja] Found 40 recent scrobbles
multi-scrobbler    | 2023-07-23T17:13:29.992465808Z 2023-07-23T11:13:29-06:00 info    : [Scrobblers] [Maloja - Maloja] Scrobbled (New)     => (Jellyfin) For Giants - Maru @ 2023-07-23T11:12:56-06:00
multi-scrobbler    | 2023-07-23T17:13:29.993048887Z 2023-07-23T11:13:29-06:00 debug   : [Scrobblers] [Maloja - Maloja] Raw Payload: {"album":"Maru","artists":["For Giants"],"key":"EtTKaep3ywGlfLgnVnHow5OqrD6Fg1ZfxurAanZspCQv7lBmHRiRk8Ud69UlXtfk","length":343,"time":1690132376,"title":"Maru"}
multi-scrobbler    | 2023-07-23T17:13:29.993159736Z 2023-07-23T11:13:29-06:00 debug   : [Scrobblers] [Lastfm] Refreshing recent scrobbles
multi-scrobbler    | 2023-07-23T17:13:30.350808884Z 2023-07-23T11:13:30-06:00 debug   : [Scrobblers] [Lastfm] Found 40 recent scrobbles
multi-scrobbler    | 2023-07-23T17:13:30.515345373Z 2023-07-23T11:13:30-06:00 info    : [Scrobblers] [Lastfm - ] Scrobbled (New)     => (Jellyfin) For Giants - Maru @ 2023-07-23T11:12:56-06:00
multi-scrobbler    | 2023-07-23T17:13:31.517940457Z 2023-07-23T11:13:31-06:00 debug   : [Scrobblers] [Lastfm] Raw Payload:  {"album":"Maru","artist":"For Giants","duration":343,"track":"Maru"}
multi-scrobbler    | 2023-07-23T17:13:31.518121438Z 2023-07-23T11:13:31-06:00 debug   : [Scrobblers] [Listenbrainz - brainz] Refreshing recent scrobbles
multi-scrobbler    | 2023-07-23T17:13:32.743119948Z 2023-07-23T11:13:32-06:00 debug   : [Scrobblers] [Listenbrainz - brainz] Found 40 recent scrobbles
multi-scrobbler    | 2023-07-23T17:13:33.268641244Z 2023-07-23T11:13:33-06:00 info    : [Scrobblers] [Listenbrainz - brainz] Scrobbled (New)     => (Jellyfin) For Giants - Maru @ 2023-07-23T11:12:56-06:00
multi-scrobbler    | 2023-07-23T17:13:34.269530338Z 2023-07-23T11:13:34-06:00 debug   : [Scrobblers] [Listenbrainz - brainz] Raw Payload: {"rawPayload":{"listen_type":"single","payload":[{"listened_at":1690132376,"track_metadata":{"additional_info":{"artist_mbids":["e3fc2e33-dd16-47d7-a330-d4d67d9fec2d"],"duration":343,"release_group_mbid":"874a7c48-0d5b-40a4-b757-24cd04fee82a","release_mbid":"c5cb71a5-cc66-425c-9b11-33cbde91f704","track_mbid":"a81f975e-3013-4086-abb1-fffe7d7409eb"},"artist_name":"For Giants","track_name":"Maru"}}]}}
multi-scrobbler    | 2023-07-23T17:13:51.638405565Z 2023-07-23T11:13:51-06:00 debug   : [Plex Request] Receiving request from Plex...
multi-scrobbler    | 2023-07-23T17:13:51.638511525Z 2023-07-23T11:13:51-06:00 debug   : [Plex Request] Received 0 bytes of expected 1642
multi-scrobbler    | 2023-07-23T17:13:51.638676716Z 2023-07-23T11:13:51-06:00 debug   : [Plex Request] Received 1642 bytes of expected 1642
multi-scrobbler    | 2023-07-23T17:13:51.638803575Z 2023-07-23T11:13:51-06:00 debug   : [Plex Request] File Begin: payload
multi-scrobbler    | 2023-07-23T17:13:51.638969238Z 2023-07-23T11:13:51-06:00 debug   : [Plex Request] File Recieved: payload
multi-scrobbler    | 2023-07-23T17:13:51.639022398Z 2023-07-23T11:13:51-06:00 debug   : [Plex Request] Received end of form data from Plex
multi-scrobbler    | 2023-07-23T17:13:51.639199031Z 2023-07-23T11:13:51-06:00 debug   : [Sources] [Plex - megaplex] Will not scrobble event because it is not media.scrobble

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

Additional context Add any other context about the problem here.

captainnapalm commented 11 months ago

Here are the logs with debug logging ON

multi-scrobbler    | 2023-07-23T17:30:03.613354236Z 2023-07-23T11:30:03-06:00 info    : [Ingress] [Plex] Received request from a new remote address: ::ffff:172.18.0.1 (UA: PlexMediaServer/1.32.5.7328-2632c9d3a)
multi-scrobbler    | 2023-07-23T17:30:03.614331197Z 2023-07-23T11:30:03-06:00 debug   : [Plex Request] Receiving request from Plex...
multi-scrobbler    | 2023-07-23T17:30:03.614876064Z 2023-07-23T11:30:03-06:00 debug   : [Plex Request] Received 0 bytes of expected 1485
multi-scrobbler    | 2023-07-23T17:30:03.616023215Z 2023-07-23T11:30:03-06:00 debug   : [Plex Request] Received 1485 bytes of expected 1485
multi-scrobbler    | 2023-07-23T17:30:03.617939946Z 2023-07-23T11:30:03-06:00 debug   : [Plex Request] File Begin: payload
multi-scrobbler    | 2023-07-23T17:30:03.619070577Z 2023-07-23T11:30:03-06:00 debug   : [Plex Request] File Recieved: payload
multi-scrobbler    | 2023-07-23T17:30:03.619283287Z 2023-07-23T11:30:03-06:00 debug   : [Plex Request] Received end of form data from Plex
multi-scrobbler    | 2023-07-23T17:30:03.619825208Z 2023-07-23T11:30:03-06:00 info    : [Ingress] [Plex] ::ffff:172.18.0.1 (UA: PlexMediaServer/1.32.5.7328-2632c9d3a) Received valid data from server Megaplex for the first time.
multi-scrobbler    | 2023-07-23T17:30:03.620728129Z 2023-07-23T11:30:03-06:00 debug   : [Sources] [Plex - megaplex] Will not scrobble event because it is not media.scrobble (media.resume) {"artists":["For Giants"],"track":"Maru"}
multi-scrobbler    | 2023-07-23T17:30:15.057966608Z 2023-07-23T11:30:15-06:00 debug   : [Plex Request] Receiving request from Plex...
multi-scrobbler    | 2023-07-23T17:30:15.058256855Z 2023-07-23T11:30:15-06:00 debug   : [Plex Request] Received 0 bytes of expected 1484
multi-scrobbler    | 2023-07-23T17:30:15.058740857Z 2023-07-23T11:30:15-06:00 debug   : [Plex Request] Received 1484 bytes of expected 1484
multi-scrobbler    | 2023-07-23T17:30:15.059060649Z 2023-07-23T11:30:15-06:00 debug   : [Plex Request] File Begin: payload
multi-scrobbler    | 2023-07-23T17:30:15.059338743Z 2023-07-23T11:30:15-06:00 debug   : [Plex Request] File Recieved: payload
multi-scrobbler    | 2023-07-23T17:30:15.059475310Z 2023-07-23T11:30:15-06:00 debug   : [Plex Request] Received end of form data from Plex
multi-scrobbler    | 2023-07-23T17:30:15.059782710Z 2023-07-23T11:30:15-06:00 debug   : [Sources] [Plex - megaplex] Will not scrobble event because it is not media.scrobble (media.pause) {"artists":["For Giants"],"track":"Maru"}
FoxxMD commented 11 months ago

Thanks for the detailed logs. multi-scrobbler listens for a specific event that plex sends, media.scrobble, that signifies the track has been played for the majority of its duration. This is not an event MS controls -- Plex decides when to send media.scrobble.

Can you confirm that you are playing a track from beginning to end in its entirety? The resume and pause events infer that only a portion of the track is being played which might be why plex is not scrobbling it.

captainnapalm commented 11 months ago

I had been listening to a playlist in Plexamp for about 30 minutes and nothing had scrobbled when I started just doing some testing and grabbing logs to create the bug report. I had not seen those messages previously, but see them now prior to a successful scrobble. Had a power outage overnight (server stayed online) and things seem to working as expected again. I'll close this.