[vlc-commits] youtube.lua: fix artist parsing
Pierre Ynard
git at videolan.org
Wed Jan 13 23:04:18 CET 2016
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Jan 13 23:03:44 2016 +0100| [a4ced6b4ece2f97ca89cffe304f04660e1ea9965] | committer: Pierre Ynard
youtube.lua: fix artist parsing
It does happen to occasionally break due to random field ordering.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4ced6b4ece2f97ca89cffe304f04660e1ea9965
---
share/lua/playlist/youtube.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index d1d9e07..6743f79 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -268,8 +268,8 @@ function parse()
arturl = vlc.strings.resolve_xml_special_chars( arturl )
end
- if string.match(line, "\"author\":\"(.-)\",") then
- _,_,artist = string.find(line, "\"author\":\"(.-)\",")
+ if string.match(line, "\"author\": *\"(.-)\"") then
+ _,_,artist = string.find(line, "\"author\": *\"(.-)\"")
end
-- JSON parameters, also formerly known as "swfConfig",
More information about the vlc-commits
mailing list