[SCM] Video extraction utility for YouTube, Google Video and other video sites (Debian packaging) branch, master, updated. upstream/2.1.9-120-g5cdb4a5

legatvs legatvs at gmail.com
Thu Apr 9 07:26:00 UTC 2009


The following commit has been merged in the master branch:
commit 8b5d4bc4e556c9b598337b9f96eb553009645da4
Author: legatvs <legatvs at gmail.com>
Date:   Sat Apr 4 02:20:40 2009 +0300

    Fix reading from stdin (closes Debian #522422).

diff --git a/CHANGES b/CHANGES
index ae04b57..95e2e77 100644
--- a/CHANGES
+++ b/CHANGES
@@ -23,6 +23,8 @@ for clive.
     - Use "flv" for exceptions (e.g. octet-*, x-flv, etc.)
   * Replace dashes in video ID with underscores
   * Change --version output
+  * Fix reading from stdin (closes Debian #522422)
+    - Assume reading from stdin only if queue and argv arrays are empty
 
  Developer-visible changes:
   * Update examples/config with limit_rate
diff --git a/clive b/clive
index 72708e1..4096848 100755
--- a/clive
+++ b/clive
@@ -646,7 +646,11 @@ sub get_queue
 
     parse_input($_) foreach @ARGV;
     grep_cache() if $opts{grep};
-    unless (@queue) { parse_input($_) while (<STDIN>); }
+
+    if (scalar(@queue) == 0 && scalar(@ARGV == 0))
+    {
+        parse_input($_) while <STDIN>;
+    }
 
     if (open my $fh, ">$RECALLFILE")
     {
@@ -1700,7 +1704,7 @@ sub title_to_filename
     my %h = (
              "%t" => $title,
              "%s" => $entry{file_suffix},
-             "%d" => $a[scalar @a - 2],             # Without the TLD.
+             "%d" => $a[scalar(@a - 2)],            # Without the TLD.
              "%i" => $entry{video_id},
              "%D" => (split(/ /, $timestamp))[0],
              "%T" => (split(/ /, $timestamp))[1],
@@ -1792,7 +1796,7 @@ sub show_cache
     close STDOUT
       if $opted_mods{IOPager};
 
-    if ($opts{grep} and $opts{delete} and scalar @queue > 0)
+    if ($opts{grep} and $opts{delete} and scalar(@queue > 0))
     {
         print "Confirm delete (y/N):";
         $_ = lc <STDIN>;

-- 
Video extraction utility for YouTube, Google Video and other video sites (Debian packaging)



More information about the Pkg-perl-cvs-commits mailing list