git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c56bfee
)
GrabberBase; make use of new connector infrastructure
author
Ralf Ertzinger
<ralf@skytale.net>
Sat, 3 Sep 2011 22:01:10 +0000
(
00:01
+0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Sat, 3 Sep 2011 22:01:10 +0000
(
00:01
+0200)
videosite/GrabberBase.pm
patch
|
blob
|
history
diff --git
a/videosite/GrabberBase.pm
b/videosite/GrabberBase.pm
index
b0bf480
..
8ff32b4
100644
(file)
--- a/
videosite/GrabberBase.pm
+++ b/
videosite/GrabberBase.pm
@@
-23,6
+23,7
@@
sub get($$) {
my $self = shift;
my $url = shift;
my $pattern;
my $self = shift;
my $url = shift;
my $pattern;
+ my $res;
return undef unless $self->_getval('enabled');
return undef unless $self->_getval('enabled');
@@
-30,7
+31,16
@@
sub get($$) {
$self->debug("Matching %s against %s", $pattern, $url);
if ($url =~ m|$pattern|) {
$self->debug("Match");
$self->debug("Matching %s against %s", $pattern, $url);
if ($url =~ m|$pattern|) {
$self->debug("Match");
- return wantarray?($self->_parse($url, $pattern), $pattern):$self->_parse($url, $pattern);
+ foreach ($self->connectors()) {
+ $self->debug("Using connector %s", $_->{-name});
+ $self->selectconn($_);
+ $res = $self->_parse($url, $pattern);
+ if (defined($res)) {
+ $res->{'CONNECTOR'} = $_;
+ last;
+ }
+ }
+ return wantarray?($res, $pattern):$res;
}
}
}
}