Created
April 19, 2012 17:34
-
-
Save squentin/2422493 to your computer and use it in GitHub Desktop.
small script to set playcount for a song
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
#!/usr/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