Created
March 17, 2011 15:43
-
-
Save squentin/874546 to your computer and use it in GitHub Desktop.
example to set playcount for a song via DBus api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/perl | |
use warnings; | |
use strict; | |
use Net::DBus; | |
my $bus = Net::DBus->session; | |
my $service = $bus->get_service('org.gmusicbrowser'); | |
my $object = $service->get_object('/org/gmusicbrowser', 'org.gmusicbrowser'); | |
die "Usage : $0 file(with full path) value\n" unless @ARGV==2; | |
my $song=shift; | |
my $value=shift; | |
my $ok= $object->Set([$song,'playcount',$value]); | |
warn "error\n" unless $ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment