Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listenbrainz 'playing_now' Support #74

Open
ARufenach opened this issue Mar 22, 2023 · 8 comments
Open

Listenbrainz 'playing_now' Support #74

ARufenach opened this issue Mar 22, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@ARufenach
Copy link

Listenbrainz has a feature that can track live listens using the 'playing_now' type instead of the 'single' type when submitting to the submit-listens endpoint. This would be a nice addition to see what's being listened to at the moment from the Listenbrainz side.

@FoxxMD
Copy link
Owner

FoxxMD commented Mar 22, 2023

I like this idea and I'd like to expand it a little bit and have a "now playing" in the MS ui for every source it is monitoring as well as notification/webhook functionality. It's already tracking this information in order to determine when to scrobble. Going to work on this for a bit.

@ARufenach
Copy link
Author

That sounds like a great extension of the idea. I await the fleshed out update👍

@FoxxMD FoxxMD added the enhancement New feature or request label May 24, 2023
FoxxMD added a commit that referenced this issue Aug 9, 2023
* Implements generic Player state tracking when using MemorySource
  * State tracking will replace processRecentPlays and all its data structures
* Tracks reported player position OR real-time listened when position not available
* Records listened sessions for more exhaustive "listen to" duration and eventually comparing incoming data playedAt for dups
* Uses own tracked data to calculate most likely player state (stopped/started/paused) as well as health (stale/orphaned from no data)
* Tracks player's reported state, if provided
@FoxxMD
Copy link
Owner

FoxxMD commented Sep 8, 2023

Hey @ARufenach just wanted to let you know progress is being made :)

image

@ARufenach
Copy link
Author

Looks great! Can't wait for the update.

FoxxMD added a commit that referenced this issue Sep 18, 2023
* Use listenbrainz 'playing-now' endpoint for MS player implementation
* Do not use MS player as source of truth -- continue to use LZ listen history
@FoxxMD
Copy link
Owner

FoxxMD commented Sep 18, 2023

@ARufenach you can try MS with now playing support for listenbrainz in the develop branch or foxxmd/multi-scrobbler:develop docker image.

Caveat for how it works:

  • LZ does not provide positional information (where your player is in the track) so MS will not either
  • LZ may not know the duration of the track (it's based on musicbrainz returning a valid mapping) in which case MS will show 0:00 as the track length
  • The player is for display only. MS will still use the normal "scrobble history" provided by LZ as the source of truth for scrobbles.

Additionally, player functionality is now enabled for lastfm sources.

@ARufenach
Copy link
Author

Just pulled the latest docker image and the new UI changes look really good, but I'm not getting the 'now playing' notification on the Listenbrainz website like this:
image
I do get this however if I use the Jellyfin Listenbrainz plugin and bypass MS. Scrobbles are still submitted like normal, just no 'now playing' display.

@FoxxMD
Copy link
Owner

FoxxMD commented Sep 20, 2023

Ah I think I see...so what you are wanting is:

  • MS has a Listenbrainz Client
  • A configured MS Source monitors a playing track
    • MS uses your Listenbrainz Client to send a now_playing notification to Listenbrainz so you can see on the LZ website?

If this is correct this is not how I interpreted it 😅 the feature I introduced is for a Listenbrainz Source where MS gets the now_playing notification from LZ and displays it.

I'll need to do some more research to see if sending a now_playing notification affects subsequent scrobbles -- or if LZ scrobbles based on now_playing -- and see about using the play to notify an MS client...

@ARufenach
Copy link
Author

Oh that's my bad, I should've been more specific in the initial request. I wasn't even aware that you could have Listenbrainz as a source.

But yes, my request is to have a configured source (in my case Jellyfin) playing a track, have MS monitoring it and send Listenbrainz a now_playing payload such that when you're listening to a track, it displays as 'now playing' on Listenbrainz. Purely a nice-to-have feature. Sorry for the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants