Changeset e20354c for debian/lib
- Timestamp:
- Jun 24, 2010, 1:48:08 AM (14 years ago)
- Branches:
- master, debian, mac, no-cups, nodebathena, web
- Children:
- b30ec0c
- Parents:
- 7bc8b29
- git-author:
- Jessica B. Hamrick <jhamrick@…> (05/12/10 22:47:15)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (06/24/10 01:48:08)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
debian/lib/gutenbach
r53e9374 re20354c 25 25 use IPC::Open2; 26 26 use English; 27 28 use vars qw/$zephyr_class $host $queue $mixer $channel/; 27 29 28 30 require "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" or die "Unable to load configuration"; … … 65 67 66 68 my %arguments = ( 67 job-id=> $ARGV[0],69 "job-id" => $ARGV[0], 68 70 user => $ARGV[1], 69 job-title=> $ARGV[2],71 "job-title" => $ARGV[2], 70 72 copies => $ARGV[3], 71 73 options => {split(/[= ]/, $ARGV[4])}, … … 83 85 } 84 86 close($fh); 87 $arguments{"file"} = $file; 85 88 } 86 89 … … 93 96 open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!"; 94 97 95 print(ZEPHYR "$arguments{user}\@$arguments{options}{job-originating-host-name}is playing:\n");96 my $status = "User: $arguments{user}\@$arguments{options}{job-originating-host-name}.");98 print(ZEPHYR $arguments{"user"},"\@",$arguments{"options"}{"job-originating-host-name"}," is playing:\n"); 99 my $status = "User: ".$arguments{"user"}."\@".$arguments{"options"}{"job-originating-host-name"}; 97 100 98 101 # SIGHUP handler, in case we were aborted … … 107 110 108 111 # Read the metadata information from the file. 109 my ($filepath) = $ options{"file"};112 my ($filepath) = $arguments{"file"}; 110 113 my ($fileinfo) = ImageInfo($filepath); 111 114 my ($magic) = $fileinfo->{FileType}; 115 my ($tempdir); 116 my ($newpath); 112 117 113 118 if ($magic) { … … 128 133 } 129 134 130 my$tempdir = tempdir();135 $tempdir = tempdir(); 131 136 #awful hack -- geofft 132 137 #== -- quentin … … 135 140 # filename. I think this is because mplayer sometimes uses the file 136 141 # extension to identify a filetype. 137 my$newpath = $tempdir . '/' . basename($arguments{"job-title"});142 $newpath = $tempdir . '/' . basename($arguments{"job-title"}); 138 143 symlink($filepath, $newpath); 139 144 $filepath = $newpath; … … 184 189 my ($filepath, $arguments) = @_; 185 190 186 my $format, $uri, $userpass;191 my ($format, $uri, $userpass); 187 192 188 193 open(FILE, "<", $filepath) or die "Couldn't open spool file"; … … 250 255 251 256 my $response = $ua->get($uri); 257 my (@titles, @uris); 252 258 253 259 foreach (split("\n", $response->content())) { … … 261 267 262 268 # choose a random server 263 $server = int(rand scalar(@uris));269 my $server = int(rand scalar(@uris)); 264 270 # print the name of the stream if available 265 271 print ZEPHYR "$titles[$server]\n";
Note: See TracChangeset
for help on using the changeset viewer.