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

Updated paths and filenames to the correct values for the gutenbach package.

File:
1 moved

Legend:

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

    rf1ba976 r2e8b589  
    22# Play the data on STDIN as an audio file
    33#
    4 # $Id: sipbmp3-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
    5 # $Source: /usr/local/bin/RCS/sipbmp3-filter,v $
     4# $Id: gutenbach-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
     5# $Source: /usr/local/bin/RCS/gutenbach-filter,v $
    66#
    77# TODO
     
    2525my $zephyr_class = "sipb-test";
    2626my $host = `hostname`;
    27 my $queue = "sipbmp3";
     27my $queue = "gutenbach";
    2828
    2929# Configuration
    30 my $config_file = "/etc/sipbmp3-filter-config.pl";
     30my $config_file = "/usr/lib/gutenbach/gutenbach-filter-config.pl";
    3131if (-r $config_file) {
    3232    # Inline the configuration file
     
    4040
    4141close(STDERR);
    42 open(STDERR, ">>", "/tmp/sipbmp3.log") or warn "Couldn't open log: $!";
     42open(STDERR, ">>", "/tmp/gutenbach.log") or warn "Couldn't open log: $!";
    4343
    4444$ENV{"TERM"}="vt100";
     
    9898
    9999# For the Now Playing remctl command
    100 open(STATUS, '>', '/var/run/sipbmp3/status') or die("Can't open status file /var/run/sipbmp3/status");
     100open(STATUS, '>', '/var/run/gutenbach/status') or die("Can't open status file /var/run/gutenbach/status");
     101
     102# For the Now Playing local command
     103open(CURRENT, '>', '/var/run/gutenbach/current') or die("Can't open status file /var/run/sipbp3/current");
    101104
    102105print(ZEPHYR "$opts{'n'}\@$opts{'H'} is playing:\n");
    103106print(STATUS "User: $opts{'n'}\@$opts{'H'}\n");
     107print(CURRENT "$opts{'n'}\@$opts{'H'} is playing:\n");
    104108
    105109# SIGHUP handler
    106110sub clear_status {
    107111    # Possible race condition if the previous status is still going
    108     open(STA, '>', '/var/run/sipbmp3/status');
     112    open(STA, '>', '/var/run/gutenbach/status');
    109113    close(STA);
    110114    open(ZEPH, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '.
     
    112116    print(ZEPH "Playback aborted.\n");
    113117    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);
    114121    die;
    115122}
     
    125132if ($magic) {
    126133    printf(ZEPHYR "%s file %s\n", $magic, $opts{'J'});
     134    printf(CURRENT "%s file %s\n", $magic, $opts{'J'});
    127135    printf(STATUS "Filetype: %s\n", $magic);
    128136    printf(STATUS "Filename: %s\n", $opts{'J'});
    129137    if (exists $fileinfo->{'Title'}) {
    130138        printf(ZEPHYR "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
     139        printf(CURRENT "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
    131140        printf(STATUS "Title: %s\n", $fileinfo->{'Title'});
    132141    }
     
    134143        if (exists $fileinfo->{$key}) {
    135144            printf(ZEPHYR "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
     145            printf(CURRENT "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
    136146            printf(STATUS "%s: %s\n", $key, $fileinfo->{$key});
    137147        }
     
    150160        $title = "";
    151161        print ZEPHYR "YouTube video $filepath\n$title";
     162        print CURRENT "YouTube video $filepath\n$title";
    152163        print STATUS "YouTube video $filepath\n$title";
    153164        $filepath = <$out>;
     
    157168        print STDERR "Resolved external reference to $filepath\n";
    158169        printf(ZEPHYR "%s\n", $filepath);
     170        printf(CURRENT "%s\n", $filepath);
    159171        printf(STATUS "External: %s\n", $filepath);
    160172    }
     
    163175    split_playlist($filepath, \%opts);
    164176    close(ZEPHYR);
     177    close(CURRENT);
    165178    close(STATUS);
    166179    exit 0;
     
    170183#printf(ZEPHYR "Job priority %s\n", $opts{'C'}) if ($opts{'C'} && ($opts{'C'} ne 'A'));
    171184close(ZEPHYR);
     185close(CURRENT);
    172186close(STATUS);
    173187play_mplayer_audio($filepath, \%opts);
     
    291305       
    292306        close(ZEPHYR);
    293         open(STATUS, '>', '/var/run/sipbmp3/status');
     307        open(STATUS, '>', '/var/run/gutenbach/status');
    294308        close(STATUS);
    295309    }
Note: See TracChangeset for help on using the changeset viewer.