]> git.pld-linux.org Git - packages/clive.git/blobdiff - clive-delfi.patch
- updated for 2.1.10
[packages/clive.git] / clive-delfi.patch
index 01e727e8377d605491efb035ba0ceb5eaf415e96..080ef9d39a3e3eeb42c9ad6035e2f8284517d194 100644 (file)
@@ -1,29 +1,28 @@
---- clive-2.1.5/clive~  2009-02-10 11:00:52.000000000 +0100
-+++ clive-2.1.5/clive   2009-02-10 11:04:56.000000000 +0100
-@@ -79,6 +79,7 @@
-     IsLiveleak  => qr|liveleak.com|i,
-     IsEvisor    => qr|evisor.tv|i,
-     IsDmotion   => qr|dailymotion.com|i,
-+    IsDelfi     => qr|.delfi.|i,
- );
+--- clive-2.1.10/clive~ 2009-04-27 11:14:37.000000000 +0200
++++ clive-2.1.10/clive  2009-04-27 11:21:15.000000000 +0200
+@@ -87,6 +87,7 @@
+                  IsEvisor    => qr|evisor.tv|i,
+                  IsDmotion   => qr|dailymotion.com|i,
+                  IsCctv      => qr|tv.cctv.com|i,
++                 IsDelfi     => qr|.delfi.|i,
               );
 
- # Parse config
-@@ -324,6 +325,8 @@
-         ($xurl, $id) = handle_evisor($response_ref);
-     } elsif ($url =~ /$re_hosts{IsDmotion}/) {
-         ($xurl, $id) = handle_dmotion($response_ref);
-+    } elsif ( $url =~ /$re_hosts{IsDelfi}/ ) {
-+       ($xurl, $id) = handle_delfi($response_ref, $response_fh);
-     }
-     return -1
-         if !$xurl or !$id or !$title;
-@@ -712,6 +715,64 @@
+ my @re_hosts_arr = (
+@@ -99,6 +100,7 @@
+                     [$re_hosts{IsEvisor},    \&handle_evisor],
+                     [$re_hosts{IsDmotion},   \&handle_dmotion],
+                     [$re_hosts{IsCctv},      \&handle_cctv],
++                    [$re_hosts{IsDelfi},     \&handle_delfi],
+                    );
+
+ # Parse config              
+@@ -992,6 +993,64 @@
      return ($xurl, $id);
  }
  
 +sub handle_delfi {
 +    my ($response_ref, $response_fh) = @_;
-+
++ 
 +    my %re = (
 +    # videobox
 +    # http://www.delfi.ee/news/paevauudised/paevavideo/article.php?id=15218215
@@ -48,7 +47,7 @@
 +        $xurl = $videobox_url;
 +
 +    } elsif ($video_url) {
-+        $xurl = uri_unescape($video_url);
++        $xurl = URI::Escape::uri_unescape($video_url);
 +        $id = $1 if $xurl =~ m{^\S+://[^/]+/v/(.+?)\.flv};
 +
 +    } elsif ($video_salt and $video_site) {
@@ -79,6 +78,5 @@
 +    return ($xurl, $id);
 +}
 +
  # Subroutines: Progress
  # NOTE: the 'dot' progress copies much from wget.
This page took 0.070816 seconds and 4 git commands to generate.