Skip to content

Instantly share code, notes, and snippets.

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