-
Notifications
You must be signed in to change notification settings - Fork 21
feat: lastfm nowplaying #316
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
Conversation
… intervals * Define if scrobble client can update Now Playing based on class property, use this to filter now playing update * Use thresholds to determine when/if Now Playing should be updated * Set LastfmScrobbler as supported for Now Playing
* Enable/disable now playing reporting * WIP source filters for now playing
Thanks for the contribution! This is a good start. I've added some limiters to prevent API spamming and made now playing user-configurable via [
{
"name": "myLastFmClient",
"enable": true,
"configureAs": "client",
"data": {
"apiKey": "a89cba1569901a0671d5a9875fed4be1",
"secret": "ec42e09d5ae0ee0f0816ca151008412a",
"redirectUri": "http://localhost:9078/lastfm/callback"
},
"options": {
"nowPlaying": false
}
}
] It defaults to Last thing that is needed is to address reporting Now Playing when multiple Sources have Players at the same time. My plan is to
|
We're not-so-familiar with the codebase still, but is there a way to uniquely identify player instances? If so, perhaps we can just use a map of It seems less complicated this way to us, let us know what you think |
There is a unique player id generated from a PlayPlatformId (device + user) parsed from Play data. However the id is not user friendly, deterministic, or easily predictable -- IE spotify players identify using unique device strings but subsonic players identify using an incrementing numeric value based on how many concurrent players are already playing.
Scrobble clients are not aware of what Sources are already configured, that responsibility is left up to |
* Add queue for aggregating Now Playing updates * Filter play based on 1. source priority and 2. player stickiness or deterministic order * Use toad scheduler to processing NP queue
@msparkles queue/scheduling/filter/sort is all implemented and the image Still to-do:
|
We'll test it out today ASAP.
Should this be a separate PR? We can't test this ourselves since we don't use Listenbrainz. |
Yeah I can add LZ implementation after merging. |
@msparkles Please update to the latest |
@FoxxMD We're running the program via systemd, so we can't test the image per-se, but it works on the latest commit! |
📦 A new release has been made for this pull request.To play around with this PR, pull an image:
Images are available for x86_64 and ARM64.
|
Docs are now updated and I implemented an additional ENV Thanks for contributions and feedback. This is available in the |
Checklist before requesting a review
Type of change
Please delete options that are not relevant.
Describe your changes
Implements the Last.FM API for scrobbling the currently playing track.
The implementation is a bit crude, as we attempted to make the minimally needed changes. Feel free to reject the PR in this state, we just really wanted the feature to work already, and we're submitting the PR out of courtesy.
We've tested that it works on our machine:tm:, though there may be some potential issues with calling the API too often. We're also not ignoring duplicated scrobbles, as we wanted to make minimal changes.
We'll mark the PR as a draft PR for now, as we expect sure changes, since we're not very familiar with the codebase.
A few changes are just eslint being applied, feel free to ask to exclude those changes.
Issue number and link, if applicable
#164 (only the Last.FM part)