Changeset 80bbeea


Ignore:
Timestamp:
Jun 24, 2010, 1:27:27 AM (14 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
a33a064
Parents:
d988d9d
git-author:
Jessica B. Hamrick <jhamrick@…> (12/13/09 00:48:24)
git-committer:
Jessica B. Hamrick <jhamrick@…> (06/24/10 01:27:27)
Message:

Fixed path to config file, and changed the defaults.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gutenbach/debian/lib/gutenbach-filter

    rd988d9d r80bbeea  
    2323use IPC::Open2;
    2424
    25 my $zephyr_class = "sipb-test";
     25my $zephyr_class = `hostname`;
     26chomp($zephyr_class);
    2627my $host = `hostname`;
     28chomp($host);
    2729my $queue = "gutenbach";
    2830
    2931# Configuration
    30 my $config_file = "/usr/lib/gutenbach/gutenbach-filter-config.pl";
     32my $config_file = "/usr/lib/gutenbach/config/gutenbach-filter-config.pl";
    3133if (-r $config_file) {
    3234    # Inline the configuration file
     
    9395printf(STDERR Dumper(\%opts));
    9496
     97print(STDERR '/usr/bin/zwrite -d -n -c '.$zephyr_class.' -i '.$queue.'@'.$host.' -s "Gutenbach Music Spooler"');
     98
    9599# Status messages at start of playback
    96 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i ' .
    97   $queue.'@'.$host.' -s "SIPB LPR music spooler"');
     100open(ZEPHYR, '|/usr/bin/zwrite -d -n -c '.$zephyr_class.' -i '.$queue.'@'.$host.' -s "Gutenbach Music Spooler"');
    98101
    99102# For the Now Playing remctl command
    100103open(STATUS, '>', '/var/run/gutenbach/status') or die("Can't open status file /var/run/gutenbach/status");
    101104
    102 # For the Now Playing local command
    103 open(CURRENT, '>', '/var/run/gutenbach/current') or die("Can't open status file /var/run/sipbp3/current");
    104105
    105106print(ZEPHYR "$opts{'n'}\@$opts{'H'} is playing:\n");
    106107print(STATUS "User: $opts{'n'}\@$opts{'H'}\n");
    107 print(CURRENT "$opts{'n'}\@$opts{'H'} is playing:\n");
    108108
    109109# SIGHUP handler
     
    112112    open(STA, '>', '/var/run/gutenbach/status');
    113113    close(STA);
    114     open(ZEPH, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '.
    115         $queue.'@'.$host.' -s "SIPB LPR music spooler"');
     114    open(ZEPH, '|/usr/bin//zwrite -d -n -c '.$zephyr_class.' -i '.$queue.'@'.$host.' -s "Gutenbach Music Spooler"');
    116115    print(ZEPH "Playback aborted.\n");
    117116    close(ZEPH);
    118     open(CURRENT, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '.
    119         $queue.'@'.$host.' -s "SIPB LPR music spooler"');
    120     close(CURRENT);
    121117    die;
    122118}
     
    132128if ($magic) {
    133129    printf(ZEPHYR "%s file %s\n", $magic, $opts{'J'});
    134     printf(CURRENT "%s file %s\n", $magic, $opts{'J'});
    135130    printf(STATUS "Filetype: %s\n", $magic);
    136131    printf(STATUS "Filename: %s\n", $opts{'J'});
    137132    if (exists $fileinfo->{'Title'}) {
    138133        printf(ZEPHYR "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
    139         printf(CURRENT "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
    140134        printf(STATUS "Title: %s\n", $fileinfo->{'Title'});
    141135    }
     
    143137        if (exists $fileinfo->{$key}) {
    144138            printf(ZEPHYR "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
    145             printf(CURRENT "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
    146139            printf(STATUS "%s: %s\n", $key, $fileinfo->{$key});
    147140        }
     
    160153        $title = "";
    161154        print ZEPHYR "YouTube video $filepath\n$title";
    162         print CURRENT "YouTube video $filepath\n$title";
    163155        print STATUS "YouTube video $filepath\n$title";
    164156        $filepath = <$out>;
     
    168160        print STDERR "Resolved external reference to $filepath\n";
    169161        printf(ZEPHYR "%s\n", $filepath);
    170         printf(CURRENT "%s\n", $filepath);
    171162        printf(STATUS "External: %s\n", $filepath);
    172163    }
     
    175166    split_playlist($filepath, \%opts);
    176167    close(ZEPHYR);
    177     close(CURRENT);
    178168    close(STATUS);
    179169    exit 0;
     
    183173#printf(ZEPHYR "Job priority %s\n", $opts{'C'}) if ($opts{'C'} && ($opts{'C'} ne 'A'));
    184174close(ZEPHYR);
    185 close(CURRENT);
    186175close(STATUS);
    187176play_mplayer_audio($filepath, \%opts);
     
    280269
    281270    # Prepare to write status:
    282     open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '.$zephyr_class.' -i ' .
    283          $queue.'@'.$host.' -s "SIPB LPR music spooler"');
     271    open(ZEPHYR, '|/usr/bin//zwrite -d -n -c '.$zephyr_class.' -i '.$queue.'\@'.$host.' -s "Gutenbach Music Spooler"');
    284272   
    285273    # fork for mpg123
Note: See TracChangeset for help on using the changeset viewer.