Index: .gitignore
===================================================================
--- .gitignore	(revision 323f614343e390b574504be71f2200aa9eae3d1d)
+++ .gitignore	(revision b58aada87ec6059c23a058212e912b08475d399d)
@@ -1,2 +1,3 @@
 *~
 client/bin/*.1.gz
+debian/
Index: README
===================================================================
--- README	(revision 03e2535c2b1455293dbd19f9500c58ea53244705)
+++ README	(revision b58aada87ec6059c23a058212e912b08475d399d)
@@ -87,7 +87,4 @@
   package or something
 
-- add regex support to the client scripts, so you can do something
-  like `gbr sipbmp3 *.mp3` and have it send separate jobs to the queue
-
 - add client scripts for the remctl package, something maybe like
   `gbvol [set|get] number`.  Or maybe just leave it with using remctl.
@@ -95,4 +92,4 @@
 - fix the web interface
 
-- fix the youtube feature.  Additionally, make it possible to play
-  movies!
+- Make it possible to play movies; i.e. add video support (the audio
+  support is already there, obviously)
Index: client/bin/gbq
===================================================================
--- client/bin/gbq	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
+++ client/bin/gbq	(revision b58aada87ec6059c23a058212e912b08475d399d)
@@ -38,5 +38,5 @@
 
 print "Queue listing for queue '$queue' on '$host'\n\n";
-print "Job ID\t\tOwner\t\tFile\n";
+print "Job ID\t\tOwner\t\tTitle\n";
 print "-----------------------------------------------------------------\n";
 
Index: client/bin/gbr
===================================================================
--- client/bin/gbr	(revision 38388acaa1599127b64658ba68abde7707e48326)
+++ client/bin/gbr	(revision b58aada87ec6059c23a058212e912b08475d399d)
@@ -5,4 +5,8 @@
 use strict;
 use warnings;
+
+use Net::CUPS;
+use Net::CUPS::Destination;
+use Image::ExifTool qw(ImageInfo);
 
 my $usage = "Usage: gbr QUEUE FILES\n";
@@ -31,20 +35,36 @@
 }
 
-$ENV{CUPS_SERVER}="$host";
+my $cups = Net::CUPS->new();
+$cups->setServer("$host");
+my $printer = $cups->getDestination("$queue");
+my ($jobid, $title);
 
 foreach my $file(@files) {
     if ($file =~ m|http://www\.youtube\.com/watch\?v=|) {
-	open(LP, "|-", "lp", "-d$queue") or die "Couldn't execute lp command";
-	print LP "$file";
-	close LP;
+	open FILE, ">", "/tmp/gutenbach-youtube\n" or die "Couldn't create temporary file";
+	print FILE $file;
+	$title = $file;
+	$file = "/tmp/gutenbach-youtube";
+	$printer->addOption("copies", 42);
     }
     else {
-	my $pid = open(LP, "-|");
-	if (not $pid) {
-	    my @args = ("lp", "-d$queue", "$file");
-	    exec(@args) or die "Couldn't execute lp command";
+	my $fileinfo = ImageInfo($file);
+	my $magic = $fileinfo->{FileType};
+
+	if ($magic) {
+	    $title = $fileinfo->{'Title'}." - ".$fileinfo->{'Artist'}." - ".$fileinfo->{'Album'};
+	}
+	else {
+	    $title = $file;
 	}
     }
 
-    print "Sent job '$file'\n";
+    $jobid = $printer->printFile($file, $title);
+    
+    if ($jobid) {
+	print "Sent job '$title' (id $jobid)\n";
+    }
+    else {
+	print "Error sending job '$title'\n";
+    }
 }
Index: client/bin/gbrm
===================================================================
--- client/bin/gbrm	(revision a81397c5dc7c904a220b08337b1999bb194d9d8d)
+++ client/bin/gbrm	(revision b58aada87ec6059c23a058212e912b08475d399d)
@@ -34,20 +34,19 @@
 }
 
-my @args;
+my $cups = Net::CUPS->new();
+$cups->setServer("$host");
+my $printer = $cups->getDestination("$queue");
+my @jobs = $printer->getJobs(0, 0);
 
 if ($id eq "all") {
-    @args = ("cancel", "-a", "$queue");
+    foreach $id(@jobs) {
+	$printer->cancelJob($id);
+    }
 }
 elsif ($id eq "current") {
-    my $cups = Net::CUPS->new();
-    $cups->setServer("$host");
-    my $printer = $cups->getDestination("$queue");
-    my @jobs = $printer->getJobs(0, 0);
-    my $id = $jobs[0];
-    @args = ("cancel", "$id", "$queue");
+    $id = $jobs[0];
+    $printer->cancelJob($id);
 }
 else {
-    @args = ("cancel", "$id", "$queue");
+    $printer->cancelJob($id);
 }
-$ENV{CUPS_SERVER}="$host";
-exec (@args) or die "Couldn't execute cancel command";
Index: server/lib/gutenbach
===================================================================
--- server/lib/gutenbach	(revision c5a98db70c20bf299a3e4f236249c34c9ae29c12)
+++ server/lib/gutenbach	(revision b58aada87ec6059c23a058212e912b08475d399d)
@@ -121,4 +121,5 @@
 $SIG{HUP} = \&clear_status;
 $SIG{TERM} = \&clear_status;
+$SIG{INT} = \&clear_status;
 
 # Read the metadata information from the file.
