Patch for GS extension Media Player Indicator

General discussions
Locked
kinggo
Posts: 247
Joined: Thu Feb 09, 2012 5:54 am

Patch for GS extension Media Player Indicator

Post by kinggo »

This was something that I really missed and extension developer didn't include this yet although I asked for this a couple months ago
Add this....

"org.mpris.MediaPlayer2.guayadeque": this.applyGuayadequeRating,

in widget.js after line 232
and this.....

applyGuayadequeRating: function(value) {
GLib.spawn_command_line_async("guayadeque --set-rating=%s".format(value));
return true;
},

in widget.js after line 304
kinggo
Posts: 247
Joined: Thu Feb 09, 2012 5:54 am

Patch for GS extension Media Player Indicator

Post by kinggo »

meh......... it doesn't work. It allows me to rate in extension but that rating doesn't get to guayadeque :(

OK, this section is for rhythmbox. Can anybody point me in the right direction or maybe fix this?

applyRhythmbox3Rating: function(value) {
const Rhythmbox3Iface =




;
const Rhythmbox3Proxy = Gio.DBusProxy.makeProxyWrapper(Rhythmbox3Iface);

if (this._player.trackUrl) {
let proxy = new Rhythmbox3Proxy(Gio.DBus.session, "org.gnome.Rhythmbox3",
"/org/gnome/Rhythmbox3/RhythmDB");
proxy.SetEntryPropertiesRemote(this._player.trackUrl, {rating: GLib.Variant.new_double(value)});
return true;
}

return false;
},

destroy: function() {
this.actor.destroy();
},
kinggo
Posts: 247
Joined: Thu Feb 09, 2012 5:54 am

Patch for GS extension Media Player Indicator

Post by kinggo »

bump....
I still didn't figure this out :(
with this...

applyGuayadequeRating: function(value) {
GLib.spawn_command_line_async("guayadeque --set-rating=%s".format(value));
return true;
}, - See more at: http://guayadeque.org/index.php?p=/disc ... tor#Item_2

... I get that extension can set ratings but in terminal I see this
18:40:40: Loading 0 0 => 5717 '--set-rating=5'
18:40:40: Loading '--set-rating=5'
18:40:40: Error: File doesnt exist '--set-rating=5'
zoidberg
Posts: 1
Joined: Sun Apr 20, 2014 8:13 am

Patch for GS extension Media Player Indicator

Post by zoidberg »

You are not alone, I have the exact same problem ;)

15:21:19: Loading 0 0 => 1 '--set-rating=3'
15:21:19: Loading '--set-rating=3'
15:21:19: Error: File doesnt exist '--set-rating=3'
User avatar
anonbeat
Posts: 2048
Joined: Thu Sep 16, 2010 9:47 pm

Patch for GS extension Media Player Indicator

Post by anonbeat »

Guayadeque dont accept command line options like this...
It just accepts a list of files to play.

Will need to check if mpris added the option to set the rate of the current track.
kinggo
Posts: 247
Joined: Thu Feb 09, 2012 5:54 am

Patch for GS extension Media Player Indicator

Post by kinggo »

THX. If it can't be done, OK. But I would like to know is it doable or not.
User avatar
anonbeat
Posts: 2048
Joined: Thu Sep 16, 2010 9:47 pm

Patch for GS extension Media Player Indicator

Post by anonbeat »

Mpris dont have any option to receive a rating :(
Will need to do it other way...
kinggo
Posts: 247
Joined: Thu Feb 09, 2012 5:54 am

Patch for GS extension Media Player Indicator

Post by kinggo »

If you can, good. If not, it's not such a big deal. I just wanted to know should I continue to bug people around with this.
The thing is, long time ago, before GS, I was using task bar icon. But after switching to GS that became hit or miss. Mostly miss because icon almost never showed up so at the end I gave up and started to use this media extension. Maybe I should try that tray icon again. Maybe now it will or won't be consistent.
Locked