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

Repeat Current Track doesn't update Play Count #104

Open
eloyekunle opened this issue Aug 2, 2017 · 3 comments
Open

Repeat Current Track doesn't update Play Count #104

eloyekunle opened this issue Aug 2, 2017 · 3 comments

Comments

@eloyekunle
Copy link

eloyekunle commented Aug 2, 2017

What's up people, Great plugin! Love it!
I'm probably the only one who enables the Play Count column in RB (need to keep track and stuff, you know?)
Well, Repeat Current Track doesn't update the play count at all. I've noticed the same on Ubuntu 15.10 (Unity), 16.04 (Unity), 16.10 (Unity) and currently 17.04 (GNOME) (been using the plugin for quite a while, ya know?).
I summoned my courage today, after years of hiding in the closet, to report the bug. Let's see what we can do to fix the bug, people. I'll be cheering in the sidelines.
Of course, if you're busy and stuff, you can give me some pointers and I'll figure out how to fix it myself and slam a PR on the table like what????
Thanks.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@fossfreedom
Copy link
Owner

Hmm. Interesting.

Alttoolbar_repeat.py

It uses the elapsed change event

So when the track gets to the end of the song, the time is reset back to zero.

I suppose that is confusing rhythmbox because the song never actually finishes.

I'm not sure if there is a play count type API. If there is one then we should call it at the end of the song to increment the count.

@fossfreedom
Copy link
Owner

in the Repeat class is the on_elapsed_change method.

You have the player var - that should be the shell_player https://lazka.github.io/pgi-docs/#RB-3.0/classes/ShellPlayer.html#RB.ShellPlayer.get_playing_entry

get the playing entry RBEntry

I think then we have to do something with the metadata https://lazka.github.io/pgi-docs/#RB-3.0/classes/RhythmDBEntry.html#RB.RhythmDBEntry

Probably https://lazka.github.io/pgi-docs/#RB-3.0/classes/RhythmDBEntry.html#RB.RhythmDBEntry.sync_metadata

Where need to get the old value of https://lazka.github.io/pgi-docs/#RB-3.0/classes/RhythmDBEntryChange.html#RB.RhythmDBEntryChange https://lazka.github.io/pgi-docs/#RB-3.0/enums.html#RB.RhythmDBPropType.PLAY_COUNT and add the new value of RhythmDBEntryChange and then call sync changes.

@eloyekunle
Copy link
Author

Hmm. Interesting.
I'll look at the resources you sent.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants