Skip to content

Instantly share code, notes, and snippets.

@squentin
Created July 28, 2014 16:36
Show Gist options
  • Save squentin/1e2679c7d8ad22408084 to your computer and use it in GitHub Desktop.
Save squentin/1e2679c7d8ad22408084 to your computer and use it in GitHub Desktop.
Small script to set field to a given value for a given file
#!/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) field value\n" unless @ARGV==3;
my $song=shift;
my $field=shift;
my $value=shift;
$object->Set([$song,$field,$value]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment