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

Implement "Now Playing" status requests #7

Open
Fulminare137 opened this issue Aug 16, 2022 · 4 comments
Open

Implement "Now Playing" status requests #7

Fulminare137 opened this issue Aug 16, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Fulminare137
Copy link

I just can't see the tracks which are being scrobbled right now and like i can't / don't know how to adjust the how much scrobbing in the plugin

@ethanndickson
Copy link
Owner

I'm not sure what you mean. Is the script running without errors?

@Fulminare137
Copy link
Author

Fulminare137 commented Aug 20, 2022

i meant like the songs i am playing should be updated in real time instead of like me waiting for it scrobble then i can show what i am listening to.
so thats a hit or a miss most of the times

@Fulminare137
Copy link
Author

Fulminare137 commented Aug 20, 2022

"and don't know how to adjust the how much scrobbing in the plugin"

here i wanted to like adjust the scrobbling rate (which is like after the song gets to 50%/60%/70% the track is scrobbled and gets added to last fm )to like x y z percentage

@ethanndickson
Copy link
Owner

ethanndickson commented Aug 21, 2022

i meant like the songs i am playing should be updated in real time instead of like me waiting for it scrobble then i can show what i am listening to. so thats a hit or a miss most of the times

image

If this is the feature you're referring to, unfortunately, I have no plans to add this.

"and don't know how to adjust the how much scrobbing in the plugin"

here i wanted to like adjust the scrobbling rate (which is like after the song gets to 50%/60%/70% the track is scrobbled and gets added to last fm )to like x y z percentage

And that's for this exact reason, scrobbles are made as soon as the track starts playing, so these features would go hand-in-hand, I would recommend implementing the Last.fm API recommended scrobble rules, rather than a percentage of the track, those rules are:

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.)

One could implement this feature by creating a "Now Playing" request on mpv's start-file event and storing the track metadata in a temp file (Overwriting any existing metadata). Then, since we have the total track duration handy, you could have the script sleep until the halfway point of the track, and which point it will read the metadata from the temp file, and if it doesn't differ from the metadata stored before it slept (in the script itself), it scrobbles the track.

If this sounds like something you (or anyone reading this) would like to have, and are capable of implementing without any dependencies, feel free to make a Pull Request :)

@ethanndickson ethanndickson changed the title I can't see tracks which are now playing Implement "Now Playing" status requests Aug 21, 2022
@ethanndickson ethanndickson added the enhancement New feature or request label Aug 21, 2022
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