Revert "Wimp: Use JSON parser to handle player args"
authorRalf Ertzinger <ralf@skytale.net>
Thu, 12 May 2011 18:56:12 +0000 (20:56 +0200)
committerRalf Ertzinger <ralf@skytale.net>
Thu, 12 May 2011 18:56:12 +0000 (20:56 +0200)
This reverts commit 717cceda344e9bebb0f0d000a4905bd755c3a1a2.

videosite/WimpGrabber.pm

index 83599a6..cda5a95 100644 (file)
@@ -10,7 +10,6 @@ use videosite::GrabberBase;
 
 use LWP::Simple qw(!get);
 use HTML::Parser;
-use videosite::JSArrayParser;
 use Data::Dumper;
 
 use strict;
@@ -73,25 +72,8 @@ sub _parse {
 
     # Look for the download URL
     foreach $e (@text) {
-        if ($e->[0] =~ m|\.setup\((.*)\);$|) {
-            my $jsp;
-            my $r;
-
-            $self->debug("Found JSON: %s", $1);
-            $jsp = videosite::JSArrayParser->new();
-            $self->debug("Using %s to parse", ref($jsp));
-            $r = $jsp->parse($1);
-
-            unless(defined($r)) {
-                $self->error("Found information hash, but could not parse");
-                return undef;
-            }
-
-            $self->debug("Parsed information: %s", Dumper($r));
-
-            if (exists($r->{'file'})) {
-                $metadata->{'DLURL'} = $r->{'file'};
-            }
+        if ($e->[0] =~ m|\.setup\(.*file:\s*"([^\x22]+)"|) {
+            $metadata->{'DLURL'} = $1;
         }
     }