[vlc-commits] youtube.lua: fix encoded characters in author name (web page)
Pierre Ynard
git at videolan.org
Mon Dec 9 19:39:36 CET 2013
vlc/vlc-2.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Aug 5 03:24:49 2013 +0200| [a1fdee8bce9b68ee8d59ea3ba18fb6389e8508c9] | committer: Felix Paul Kühne
youtube.lua: fix encoded characters in author name (web page)
Characters with accents are not encoded, but apostrophes happen
(cherry picked from commit 5c34cc1e696234bf4491e291fddab49160c9bda1)
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=a1fdee8bce9b68ee8d59ea3ba18fb6389e8508c9
---
share/lua/playlist/youtube.lua | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 286c6c0..4effd37 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -165,8 +165,13 @@ function parse()
if string.match( line, "<meta property=\"og:image\"" ) then
_,_,arturl = string.find( line, "content=\"(.-)\"" )
end
+ -- This is not available in the video parameters (whereas it
+ -- is given by the get_video_info API as the "author" field)
if not artist then
artist = string.match( line, "yt%-uix%-sessionlink yt%-user%-name[^>]*>([^<]*)</" )
+ if artist then
+ artist = vlc.strings.resolve_xml_special_chars( artist )
+ end
end
-- JSON parameters, also formerly known as "swfConfig",
-- "SWF_ARGS", "swfArgs", "PLAYER_CONFIG", "playerConfig" ...
More information about the vlc-commits
mailing list