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
#returns a function, that function takes a listref of IDs as argument, and returns a hashref of groupid=>score | |
#returns nothing on error | |
sub Random::MakeGroupScoreFunction | |
{ my ($self,$field)=@_; | |
my ($keycode,$multi)= Songs::LookupCode($field, 'hash','hashm', [ID => '$_']); | |
unless ($keycode || $multi) { warn "MakeGroupScoreFunction error : can't find code for field $field\n"; return } #return dummy sub ? | |
($keycode,my $keyafter)= split / +---- +/,$keycode||$multi,2; | |
if ($keyafter) { warn "MakeGroupScoreFunction with field $field is not supported yet\n"; return } #return dummy sub ? | |
my ($before,$score)=$self->make; | |
my $calcIDscore= $multi ? 'my $IDscore='.$score.'; for my $key ('.$keycode.') {$score{$key}+=$IDscore}' : "\$score\{$keycode}+=$score;"; |
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'); | |
my $info= $object->CurrentSong; |
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; |
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) field value\n" unless @ARGV==3; |
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 Glib; | |
use Glib::Object::Introspection; | |
Glib::Object::Introspection->setup(basename => 'Gst', version => '1.0', package => 'GStreamer1'); | |
GStreamer1::init_check([ $0, @ARGV ]) or die "Can't initialize gstreamer-1.x\n"; | |
my $reg= GStreamer1::Registry::get(); | |
$reg->lookup_feature('playbin') or die "gstreamer-1.x plugin 'playbin' not found.\n"; |
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
--- | |
gmusicbrowser_songs.pm | 29 +++++++++++++++++++---------- | |
1 file changed, 19 insertions(+), 10 deletions(-) | |
diff --git a/gmusicbrowser_songs.pm b/gmusicbrowser_songs.pm | |
index 67d331b..2d98ba0 100644 | |
--- a/gmusicbrowser_songs.pm | |
+++ b/gmusicbrowser_songs.pm | |
@@ -1091,13 +1091,15 @@ our %timespan_menu= |
OlderNewer