-
Notifications
You must be signed in to change notification settings - Fork 20
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
Missing tracks from spotify when you play part of a song, pause, and come back later #124
Comments
Thanks for the thorough writeup. The behavior you are seeing is (mostly) by design though it would be fair to call it opinionated. From the last.fm scrobbling FAQ and api docs (with emphasis by me):
My interpretation of this is that, contextually, your listening session is more important for scrobbling than just counting the track currently on the player. As a contrived example, let's say you are listening to a track that is 15 minutes long (some classical symphony). You are sitting in your living room and listen to the first 5 minutes before the timer on your oven goes off because you are in the middle of cooking dinner. You pause the track, go prep dinner for 30 minutes, then come back to finish the track (listening for another 10 minutes). Physically (mentally? emotionally?) you have experienced two listening sessions for the same track but only listened to the track once. In my mind that is two scrobbles. That is, of course, my subjective interpretation :) but its how I built multi-scrobbler to handle those kind of situations. HOWEVER...
multi-scrobbler initiating a new listening session due to spotify device change IS a bug 😅 and one that I coincidentally fixed yesterday before you created this issue! Please try switching your docker image to If it doesn't or or you'd like to present an argument against listening sessions for scrobbles I could be convinced to add a config option for changing this behavior :) |
Thank you for your quick response, and for your thoughts on this issue. I have been using the experimental docker version today. I have noticed that I'm not seeing two separate player sessions in multi-scrobbler after that change. So I do think that I was additionally seeing the device change issue, and now that does seem fixed. As for the scrobbling/% played portion; I understand the intent to capture actual plays and not simply track changes. From your example as written you said if you play the first 5 minutes of 15 minute track, prep dinner for 30 minutes and finish the remaining 10 minutes of the track that was started "you have experienced two listening sessions for the same track but only listened to the track once. In my mind that is two scrobbles". I do agree with that logic, you have effectively listened twice, but the 50% play threshold is at odds with that. In this example, it would only actually get scrobbled once. The first 5 minutes are effectively ignored, and on the second listen, the track would be listened to for more than 30 seconds and will complete 50% of the track when you hit the end of the track. If the scenario is inverted, and the first listen is 10 minutes, after coming back later and playing the remaining 5 there will be zero scrobbles, even though you listened to more than 30 seconds (technically more than 4 minutes too, which I didn't realize was also a threshold) and greater than 50% on the first listen. Essentially in any of these cases, it's only what happens on the last play that matters (since the status is being checked on track change). So if you play more then 50% of a song and come back, you get no scrobbles. It's certainly not the end of the world, but I would definitely appreciate an option that somehow made it so scrobbles weren't missed :) So I think either an option to ignore sessions, and just assume that if a play starts at a non-zero time, then all that time counts to the percentage played, or if it submitted as soon as a threshold was crossed (rather than the end of a track) would work. Of course I say that having zero knowledge of what it takes to implement that ;) Thanks again for your consideration, and thank you for making this as awesome as it is already. |
The original issue where MS didn't carry sessions between devices has been fixed in 0.6.3 |
So I've gone back through the code and reviewed this a little more thoroughly. I think we agree on how scrobbling behavior should work but were missing each others' intentions when trying to communicate it. MS has two ways of "discovering" scrobbles from a source:
The former is only used for a few sources that either do not provide a player or have more authoritative recently played data -- lastfm, listenbrainz, webscrobbler, and deezer. The latter is used for all other sources. Either because they do not provide recently played or because their player data is more widely available (tracks listened on spotify connect devices do not appear in recently played but are presented to player endpoint) or more accurate (spotify presents player position and status). The player is what we are discussing here. MS builds its own representation of a Source's player in order to more reliably model scrobbling behavior. It detects things like seeking and allows for network hiccups, etc... An overview of the behavior may clarify what we are trying to hash out:
I believe that in the example you gave MS should behave as you desire. There would be only one play session, assuming the Source player stays paused and reporting paused, between the separate listens. You may find that in the real world this is not the case, though. Specifically for Spotify (though im sure for other Sources) if you close the desktop player or let the ios/android app idle in the background on paused for too long Spotify will stop reporting the player data which MS will detect as a play session end if the player does not reappear after a certain amount of time (becomes stale). Usually about 3 minutes. For this scenario I do not plan to add any additional "smartness" to MS -- it would be very hard to determine the user's intention when the player resumed...if it resumed 4 hours later would it be the same session? Or count as a different session? What if it never resumed, should MS not scrobble the paused session for days while it waits for the next time the user opens Spotify? I would prefer to leave this up to the user and their own behavior...if you do not want the session to end between a 10 minute break then leave the app open but paused. This generally reflects the desired behavior better than MS trying to be clever about it. |
If this is something you/someone else wants to discuss further I'll convert this issue to a discussion! |
Please check the FAQ before submitting a bug report.
Describe the bug
If you play a song 50%, pause it, do something else for a period of time and then come back to play the rest of it, Spotify will pick up playing the song where it left off, but Multi-Scrobble starts the play time over again. My typical use pattern is play spotify on my phone in the car, come home/disconnect from the car, do things, and then eventually pick up listening again on my computer. It doesn't have anything to do with changing devices, I'm just demonstrating that in my usage, the trigger is very common.
Here is a screenshot of what I'm talking about. It picked up where I left off, almost 3 minutes in, but is showing 20s listened when I started playing it again. That may technically be true for this portion of the play, but this means that if you play a song beyond 50%, pause it, and then come back later; that track will never get scrobbled because it can never hit the played threshold.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It is expected that once a track completes, it will get posted as a listen. Even though it was paused for a period of time, the track was actually completed.
Logs
The logs show that it "wanted 50%" and the tracked time didn't match that.
Versions (please complete the following information):
Provide version information for any related sources/clients.
Additional context
I don't think the Spotify clients have anything to do with the issue, but I've specified for completeness.
I have also used Multi-Scrobble for a whole 2 days at this point, so I'm pretty new to it but I did look at the FAQ, Docs, and through the bug reports to see if anyone else had reported this or if I was missing some configuration nuance.
I know about the
settings in the config.json, and that might be tweakable as a work-around that would make it trigger less often, but this case would still be triggerable unless you set the percent to something ridiculously low; which could then cause false positives as you start a song and hit next to skip it.
The text was updated successfully, but these errors were encountered: