[vlc-commits] youtube.lua: fix artist parsing

Pierre Ynard git at videolan.org
Sun Dec 1 14:21:03 CET 2019


vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Dec  1 14:13:31 2019 +0100| [d6739e59820591c891bda3029c463825becd492f] | committer: Pierre Ynard

youtube.lua: fix artist parsing

(cherry picked from commit d3632939f85c2ec72173d4e4e8930670d158ddb4)
Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d6739e59820591c891bda3029c463825becd492f
---

 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 ca1f3c689f..963dff754c 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -336,8 +336,8 @@ function parse()
                 arturl = vlc.strings.resolve_xml_special_chars( arturl )
             end
 
-            if string.match(line, "\"author\": *\"(.-)\"")    then
-                _,_,artist = string.find(line, "\"author\": *\"(.-)\"")
+            if not artist then
+                artist = string.match(line, '\\"author\\":\\"(.-)\\"')
             end
 
             -- JSON parameters, also formerly known as "swfConfig",



More information about the vlc-commits mailing list