1 | 178c178 |
---|
2 | < if ($filepath =~ m|http://www\.youtube\.com\/watch\?v=|) { |
---|
3 | --- |
---|
4 | > if ($filepath =~ m|http://www\.youtube\.com/watch\?v=|) { |
---|
5 | 226c226 |
---|
6 | < if ($uri =~ m|http://www\.youtube\.com\/watch\?v=|) { |
---|
7 | --- |
---|
8 | > if ($uri =~ m|http://www\.youtube\.com/watch\?v=|) { |
---|
9 | 313,314c313,315 |
---|
10 | < $artist = $fileinfo->{'Artist'}; |
---|
11 | < $album = $fileinfo->{'Album'}; |
---|
12 | --- |
---|
13 | > $artist = $fileinfo->{'AlbumArtist'} || |
---|
14 | > $fileinfo->{'Artist'}; |
---|
15 | > $album = $fileinfo->{'Album'} || ""; |
---|
16 | 367,380c368,370 |
---|
17 | < my ($fileinfo) = ImageInfo($filepath); |
---|
18 | < my $extension = $fileinfo->{FileType}; #try to get the extension from the file |
---|
19 | < if (! $extension) { # if that fails, maybe we can get it from the job title |
---|
20 | < $extension = $opts->{"job-title"}; |
---|
21 | < $extension =~ s/.*\.//; |
---|
22 | < } |
---|
23 | < |
---|
24 | < exec("find -L /var/spool/cups/tmp -maxdepth 1 -type l -delete"); #delete broken symlinks |
---|
25 | < my $jobid = $opts->{"job-id"}; |
---|
26 | < my $newpath = "/var/spool/cups/tmp/$jobid.$extension"; #make a properly named symlink in the tmp subdirectory |
---|
27 | < symlink($filepath,$newpath) or die "Couldn't symlink"; |
---|
28 | < |
---|
29 | < my @args = (qw|/usr/bin/mplayer -fs -display :0.0 -vo x11 -zoom -x 1024 -y 768 -framedrop -nolirc -cache 512 -ao alsa -really-quiet |, $newpath); |
---|
30 | < exec(@args) || |
---|
31 | --- |
---|
32 | > my @args = (qw|/usr/bin/mplayer -fs -display :0.0 -vo x11 -zoom -x 1024 -y 768 -framedrop -nolirc -cache 512 -ao alsa -really-quiet |, $filepath); |
---|
33 | > #print STDERR "About to exec: ", Dumper([@args]); |
---|
34 | > exec(@args) || |
---|
35 | 382d371 |
---|
36 | < |
---|
37 | |
---|