InputUsername / rescrobbled

MPRIS music scrobbler daemon
GNU General Public License v3.0
232 stars 13 forks source link

Submit after percent played #72

Open The-Munk opened 2 years ago

The-Munk commented 2 years ago

It would be nice to have an option like min-play-percent that would be used something like min-play-percent-in-seconds = ( min-play-percent / 100 ) * ( mpris:length / 1000000 ) Then have the submission time used be min-play-percent-in-seconds or min-play-time, whichever is set and has the highest value.

This would let a user retain an absolute minimum while adding a relative minimum, giving better control over only scrobbling what you're actually listening to. I have 10 minute+ tracks that I'll decide I don't want to listen to 30 seconds in, as well as tracks that are 30 seconds. Setting an absolute minimum of 30 seconds would make the scrobbler blind to my shorter tracks and risk scrobbling longer tracks I'm not really listening to.

InputUsername commented 2 years ago

This feature definitely makes sense! Thanks for the suggestion.

Do you want to be able to use both min-play-time and min-play-percent at the same time?

The-Munk commented 2 years ago

Yes, both at the same time would be ideal, with the submission happening at whichever value is the highest.

The edge cases would be when the min-play-time is greater than the duration of the track. The default behavior for this, I think, should be to not submit the track. This would let the user set a bottom limit on how short tracks can be and still be submitted. I can think of a few examples of albums that have a bunch of "blank tracks", where they're under 1 second and just intended to fill time and would be annoying to accidentally scrobble. Retaining min-playtimeat the same time asmin-play-percent` allows these to stay filtered out.

It would also be nice to be able to toggle that behavior to submit the track in the event that min-play-time is greater than the length of the track and the track has reached the end (100%). It's not how I'd use it, but it's an option I can definitely imagine being useful to some people.

imjuzcy commented 1 year ago

Just to follow up, it seems that min-play-time is implemented, but min-play-percent is not, correct? Because to me a relative minimum duration makes more sense compared to an absolute one, but what @The-Munk said make sense too.

One side effect of using an absolute minimum play duration is that if set too low relative to a track's length, for example, if set to 3 minutes, and the track is 7 minutes, once I'm over the 3 minutes mark, and I pause, and play again, it'll end up having 2 scrobbles, one at 3 minute mark and one at 6 minute mark, because there are two 3 minutes "sessions" but I have actually listened to the track once.

InputUsername commented 1 year ago

@imjuzcy

Just to follow up, it seems that min-play-time is implemented, but min-play-percent is not, correct? Because to me a relative minimum duration makes more sense compared to an absolute one, but what @The-Munk said make sense too.

Correct, I haven't really had time to implement min-play-percent.

Looking at it now, I'm not even sure why I implemented an absolute time instead of a percentage in the first place. It does seem like some people use it, so I'll have to think about a good way to take both into account.

nichobi commented 1 year ago

Since there's been some discussion here in regards to when to scrobble, I thought I'd chime in with Last.FM's definition of a scrobble.

When is a scrobble a scrobble?

A track should only be scrobbled when the following conditions have been met:

  • The track must be longer than 30 seconds.
  • And the track has been played for at least half its duration, or for 4 minutes (whichever occurs earlier.)

ListenBrainz follows the same guideline, except the minimum track length.

Most scrobblers I've used allow these limits to be customized, but the overall behaviour of scrobbling when the first limit is reached is consistent between all clients.