Changeset f6c9736 for gutenbach/debian
- Timestamp:
- Mar 1, 2009, 7:42:30 AM (16 years ago)
- Branches:
- master, debian, mac, no-cups, nodebathena, web
- Children:
- a19df84
- Parents:
- 014f817
- git-author:
- Geoffrey Thomas <geofft@…> (03/01/09 07:42:30)
- git-committer:
- Geoffrey Thomas <geofft@…> (03/01/09 07:42:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gutenbach/debian/lib/sipbmp3-filter
r014f817 rf6c9736 21 21 use LWP::UserAgent; 22 22 use Data::Dumper; 23 use IPC::Open2; 23 24 24 25 my $zephyr_class = "sipb-auto"; … … 143 144 elsif ($opts{'C'} eq 'Z') { 144 145 $filepath = resolve_external_reference($filepath, \%opts); 145 print STDERR "Resolved external reference to $filepath\n"; 146 printf(ZEPHYR "%s\n", $filepath); 147 printf(STATUS "External: %s\n", $filepath); 146 if ($filepath =~ m|http://www\.youtube\.com/watch\?v=|) { 147 $pid = open2($out, $in, qw{youtube-dl -g2}, $filepath); 148 $title = <$out>; 149 print ZEPHYR "YouTube video $filepath\n$title"; 150 print STATUS "YouTube video $filepath\n$title"; 151 $filepath = <$out>; 152 chomp $filepath; 153 waitpid $pid, 0; 154 } else { 155 print STDERR "Resolved external reference to $filepath\n"; 156 printf(ZEPHYR "%s\n", $filepath); 157 printf(STATUS "External: %s\n", $filepath); 158 } 148 159 } 149 160 elsif (-T $filepath) { … … 174 185 if (<STDIN> =~ /^(\S+)/) { 175 186 $uri=$1; 187 188 if ($uri =~ m|http://www\.youtube\.com/watch\?v=|) { 189 return $uri; 190 } 176 191 177 192 my $response = $ua->head($uri);
Note: See TracChangeset
for help on using the changeset viewer.