Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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