Changeset e20354c for debian/lib


Ignore:
Timestamp:
Jun 24, 2010, 1:48:08 AM (14 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
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)
Message:

Fix perl bugs in the filter, change 'daemon' to 'lp'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/lib/gutenbach

    r53e9374 re20354c  
    2525use IPC::Open2;
    2626use English;
     27
     28use vars qw/$zephyr_class $host $queue $mixer $channel/;
    2729
    2830require "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" or die "Unable to load configuration";
     
    6567
    6668my %arguments = (
    67                  job-id => $ARGV[0],
     69                 "job-id" => $ARGV[0],
    6870                 user => $ARGV[1],
    69                  job-title => $ARGV[2],
     71                 "job-title" => $ARGV[2],
    7072                 copies => $ARGV[3],
    7173                 options => {split(/[= ]/, $ARGV[4])},
     
    8385  }
    8486  close($fh);
     87  $arguments{"file"} = $file;
    8588}
    8689
     
    9396open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
    9497
    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}.");
     98print(ZEPHYR $arguments{"user"},"\@",$arguments{"options"}{"job-originating-host-name"}," is playing:\n");
     99my $status = "User: ".$arguments{"user"}."\@".$arguments{"options"}{"job-originating-host-name"};
    97100
    98101# SIGHUP handler, in case we were aborted
     
    107110
    108111# Read the metadata information from the file.
    109 my ($filepath) = $options{"file"};
     112my ($filepath) = $arguments{"file"};
    110113my ($fileinfo) = ImageInfo($filepath);
    111114my ($magic) = $fileinfo->{FileType};
     115my ($tempdir);
     116my ($newpath);
    112117
    113118if ($magic) {
     
    128133  }
    129134
    130   my $tempdir = tempdir();
     135  $tempdir = tempdir();
    131136  #awful hack -- geofft
    132137  #== -- quentin
     
    135140  # filename. I think this is because mplayer sometimes uses the file
    136141  # extension to identify a filetype.
    137   my $newpath = $tempdir . '/' . basename($arguments{"job-title"});
     142  $newpath = $tempdir . '/' . basename($arguments{"job-title"});
    138143  symlink($filepath, $newpath);
    139144  $filepath = $newpath;
     
    184189  my ($filepath, $arguments) = @_;
    185190
    186   my $format, $uri, $userpass;
     191  my ($format, $uri, $userpass);
    187192
    188193  open(FILE, "<", $filepath) or die "Couldn't open spool file";
     
    250255
    251256  my $response = $ua->get($uri);
     257  my (@titles, @uris);
    252258
    253259  foreach (split("\n", $response->content())) {
     
    261267
    262268  # choose a random server
    263   $server = int(rand scalar(@uris));
     269  my $server = int(rand scalar(@uris));
    264270  # print the name of the stream if available
    265271  print ZEPHYR "$titles[$server]\n";
Note: See TracChangeset for help on using the changeset viewer.