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:
3eca2f3
)
- Remove Dailymotion prefix from title
author
Ralf Ertzinger
<sun@lain.camperquake.de>
Sun, 30 Dec 2007 16:17:01 +0000
(17:17 +0100)
committer
Ralf Ertzinger
<sun@lain.camperquake.de>
Sun, 30 Dec 2007 16:17:01 +0000
(17:17 +0100)
- rearrange DLURL decoding
videosite/DailyMotionGrabber.pm
patch
|
blob
|
history
diff --git
a/videosite/DailyMotionGrabber.pm
b/videosite/DailyMotionGrabber.pm
index
66fb8a0
..
b77c119
100644
(file)
--- a/
videosite/DailyMotionGrabber.pm
+++ b/
videosite/DailyMotionGrabber.pm
@@
-58,6
+58,7
@@
sub _parse {
if ('meta' eq $e->[0]) {
if ('title' eq $e->[1]->{'name'}) {
$metadata->{'TITLE'} = $e->[1]->{'content'};
+ $metadata->{'TITLE'} =~ s/^Dailymotion\s*:\s*//;
}
}
}
@@
-65,9
+66,9
@@
sub _parse {
# Look for the download URL
foreach $e (@text) {
if ($e->[0] =~ m|\.addVariable\("url", "([^\"]+)"|) {
-
my $decoded
= $1;
- $
decoded
=~ s/%(..)/chr(hex($1))/ge;
- $metadata->{'DLURL'} = $decoded;
+
$metadata->{'DLURL'}
= $1;
+ $
metadata->{'DLURL'}
=~ s/%(..)/chr(hex($1))/ge;
+
}
}