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:
1d7fcfb
)
Youtube: Add simple live stream detection
author
Ralf Ertzinger
<ralf@skytale.net>
Wed, 11 May 2011 19:58:51 +0000
(21:58 +0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Wed, 11 May 2011 19:58:51 +0000
(21:58 +0200)
videosite/YouTubeGrabber.pm
patch
|
blob
|
history
diff --git
a/videosite/YouTubeGrabber.pm
b/videosite/YouTubeGrabber.pm
index
57ef277
..
95e9f1b
100644
(file)
--- a/
videosite/YouTubeGrabber.pm
+++ b/
videosite/YouTubeGrabber.pm
@@
-207,6
+207,11
@@
sub _parse {
return undef;
}
return undef;
}
+ if (exists($r->{'args'}) and exists($r->{'args'}->{'ps'}) and ($r->{'args'}->{'ps'} eq 'live')) {
+ $self->error("Video URL seems to point to a live stream, cannot save this");
+ return undef;
+ }
+
if (exists($r->{'args'}) and exists($r->{'args'}->{'fmt_url_map'}) and ($r->{'args'}->{'fmt_url_map'} ne '')) {
my $urls = $r->{'args'}->{'fmt_url_map'};
if (exists($r->{'args'}) and exists($r->{'args'}->{'fmt_url_map'}) and ($r->{'args'}->{'fmt_url_map'} ne '')) {
my $urls = $r->{'args'}->{'fmt_url_map'};
@@
-221,6
+226,7
@@
sub _parse {
$self->debug("Pagetype: 2011 (PLAYER_CONFIG), fmt_url_map");
} else {
$self->error('fmt_url_map not found in PLAYER_CONFIG');
$self->debug("Pagetype: 2011 (PLAYER_CONFIG), fmt_url_map");
} else {
$self->error('fmt_url_map not found in PLAYER_CONFIG');
+ return undef;
}
}
}
}