Changes in / [8b0a844:4d5d9d7]


Ignore:
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gbr

    r7cdd65d r600e713  
    5252foreach my $file(@files) {
    5353    if ($file =~ m|http://www\.youtube\.com/watch\?v=|) {
    54         open FILE, ">", "/tmp/gutenbach-youtube\n" or die "Couldn't create temporary file";
     54        open FILE, ">", "/tmp/gutenbach-youtube" or die "Couldn't create temporary file";
    5555        print FILE $file;
    5656        $title = $file;
  • remctl/lib/gutenbach/volume-down

    r9c0279e r3ee56cf  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
    3 volume-set . $(( $(volume-get .) - 1 ))
     3
     4python "$(dirname $0)/volume-helper.py" -
     5
     6#volume-set . $(( $(volume-get .) - 1 ))
  • remctl/lib/gutenbach/volume-get

    r9c0279e r3ee56cf  
    55channel=$(/usr/lib/gutenbach/gutenbach-get-config channel)
    66
    7 amixer get $mixer | grep "$channel" \
    8  | perl -lne 'print $1 if (/: Playback ([0-9]+)/)'
     7amixer get $mixer | grep "^  $channel" | perl -lpe "s/  $channel: Playback //g;s/\[off\]/muted/g;s/\[on\]//g" 
  • remctl/lib/gutenbach/volume-set

    r9c0279e r3ee56cf  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
     3
     4# $1 is string "set" and is unused (passed in via remctl)
     5# $2 is the actual volume
    36
    47mixer=$(/usr/lib/gutenbach/gutenbach-get-config mixer)
    58channel=$(/usr/lib/gutenbach/gutenbach-get-config channel)
    69
    7 amixer set $mixer "$2" | grep "$channel" \
    8  | perl -lne 'print $1 if (/: Playback ([0-9]+)/)'
     10amixer set $mixer -- "$2" | grep "^  $channel" | perl -lpe "s/  $channel: Playback //g;s/\[off\]/muted/g;s/\[on\]//g"
    911
    1012volume-zephyr
  • remctl/lib/gutenbach/volume-up

    r9c0279e r3ee56cf  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
    3 volume-set . $(( $(volume-get .) + 1 ))
     3
     4python "$(dirname $0)/volume-helper.py" +
     5
     6#volume-set . $(( $(volume-get .) + 1 ))
  • server/lib/gutenbach

    r79fac02 ra2944f6  
    133133my ($tempdir);
    134134my ($newpath);
     135my ($title);
    135136
    136137open(STATUS, ">", "/var/run/gutenbach/status");
     
    139140  # $magic means that Image::ExifTool was able to identify the type of file
    140141  printf(ZEPHYR "%s file %s\n", $magic, $arguments{"job-title"});
    141   printf(STATUS "%s file %s\n", $magic, $arguments{"job-title"});
     142  #printf(STATUS $arguments{"job-title"});
    142143  $status .= sprintf(" Filetype: %s.", $magic);
    143144  $status .= sprintf(" Filename: %s.", $arguments{"job-title"});
    144 
    145145  if (exists $fileinfo->{'Title'}) {
     146      $title = $fileinfo->{'Title'};
    146147    printf(ZEPHYR "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
    147     #printf(STATUS "%s\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
     148    printf(STATUS "%s\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
    148149    $status .= sprintf(" Title: %s.", $fileinfo->{'Title'});
    149150  }
     
    174175    # YouTube URLs are resolved by the youtube-dl command.
    175176    # Launch youtube-dl
    176     $pid = open(YTDL, "-|");
    177     if ($pid) {
    178         print ZEPHYR "YouTube video $filepath.\nCurrently downloading, please wait...";
    179         close ZEPHYR;
    180         while (<YTDL>) {
    181             open(ZEPHYR, "|-", @zwrite_command);
    182             print ZEPHYR $_;
    183             close ZEPHYR;
    184         }
    185         open(ZEPHYR, "|-", @zwrite_command);
    186         print ZEPHYR "Done downloading.";
    187         close ZEPHYR;
    188     }
    189     else {
    190         my @args = ("youtube-dl", "-q", "-o", "/tmp/youtube.flv", $filepath);
    191         exec(@args) or die "Couldn't exec youtube-dl";
    192     }
    193 
    194     $filepath = "/tmp/youtube.flv";
    195     # Print the title to zephyr and the status string.
     177    $pid = open(YTDL, "-|", "youtube-dl","-b", "-g", $filepath) or die "Unable to invoke youtube-dl";
     178        print ZEPHYR "YouTube video $filepath\n$title";
     179        $status .= " YouTube video $filepath. $title.";
     180        # youtube-dl prints the URL of the flash video, which we pass to mplayer as a filename.
     181        $filepath = <YTDL>;
     182        chomp $filepath;
     183
     184
    196185  } else { # Doesn't appear to be a YouTube URL.
    197186    print STDERR "Resolved external reference to $filepath\n";
Note: See TracChangeset for help on using the changeset viewer.