This change adds a "ListenWith" feature to Subsonic, allowing a user to indicate that they are "listening along" with a friend, and have that friend's Scrobbles tracked on their LastFM/ListenBrainz accounts.
This is achieved via a listenwith package which creates an in-memory map of a user (the one submitting the scrobbles) to a set of listeners (those who are "listening along" with the user). An in-memory data structure was chosen to avoid making changes to the database schema, and because this kind of activity is inherently transient, so the cost of storing it persistently seemed unwarranted.
A user can start/stop listening with someone by using the appropriate API call. These are currently exposed through a UI on the web interface:
A drop-down list of all users (besides the logged in user). Picking one of these and hitting start adds the current user to that user's set of Listeners. Any Scrobbles the selected user makes until the stop button is selected will be scrobbled for the logged in user as well.
When the user is listening along to at least one other user, a drop down of the current listening buddies is shown. Selecting one of these and hitting stop will remove the current user from that user's set of Listeners, and Scrobbling behavior returns to normal.
Why
This is probably mostly useful if you're of the "Scrobble everything" mentality, as I am. Too often I've found myself riding in the car or otherwise hanging out with another user on my Gonic instance who is playing the music, only to feel a pang of regret that my LastFM/ListenBrainz statistics won't reflect that I've been happily listening along with them. This is my totally selfish attempt to fix that issue.
I'm currently running a forked version of Gonic which adds the code below, so I figured I'd offer to upstream it to the community.
Here's a picture of the resulting UI:
And when listening along to another user:
Limitations
Currently no subsonic clients support this functionality, so the UX is perhaps not as great as it could be; it currently requires logging in to the web UI and using the dropdown that I added). I have doubts whether this would have any luck getting added as a feature in any existing clients, as they generally aim for features specifically laid out in the subsonic spec.
What
This change adds a "ListenWith" feature to Subsonic, allowing a user to indicate that they are "listening along" with a friend, and have that friend's Scrobbles tracked on their LastFM/ListenBrainz accounts.
This is achieved via a
listenwith
package which creates an in-memory map of a user (the one submitting the scrobbles) to a set of listeners (those who are "listening along" with the user). An in-memory data structure was chosen to avoid making changes to the database schema, and because this kind of activity is inherently transient, so the cost of storing it persistently seemed unwarranted.A user can start/stop listening with someone by using the appropriate API call. These are currently exposed through a UI on the web interface:
start
adds the current user to that user's set of Listeners. Any Scrobbles the selected user makes until thestop
button is selected will be scrobbled for the logged in user as well.stop
will remove the current user from that user's set of Listeners, and Scrobbling behavior returns to normal.Why
This is probably mostly useful if you're of the "Scrobble everything" mentality, as I am. Too often I've found myself riding in the car or otherwise hanging out with another user on my Gonic instance who is playing the music, only to feel a pang of regret that my LastFM/ListenBrainz statistics won't reflect that I've been happily listening along with them. This is my totally selfish attempt to fix that issue.
I'm currently running a forked version of Gonic which adds the code below, so I figured I'd offer to upstream it to the community.
Here's a picture of the resulting UI:
And when listening along to another user:
Limitations
Currently no subsonic clients support this functionality, so the UX is perhaps not as great as it could be; it currently requires logging in to the web UI and using the dropdown that I added). I have doubts whether this would have any luck getting added as a feature in any existing clients, as they generally aim for features specifically laid out in the subsonic spec.