[vlc-commits] dailymotion.lua: partially decode video title and description

Pierre Ynard git at videolan.org
Sun Sep 18 12:45:08 CEST 2011


vlc/vlc-1.1 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat Sep 17 21:56:42 2011 +0200| [dd7b0d6d45f0181892e295e751bd360bd7152acb] | committer: Pierre Ynard

dailymotion.lua: partially decode video title and description
(cherry picked from commit 553fa2da4ecc8a55cbaaefdc6ad4ed2b3eb7f48f)

Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

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

 share/lua/playlist/dailymotion.lua |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/share/lua/playlist/dailymotion.lua b/share/lua/playlist/dailymotion.lua
index 5a69d86..4af70f7 100644
--- a/share/lua/playlist/dailymotion.lua
+++ b/share/lua/playlist/dailymotion.lua
@@ -49,7 +49,13 @@ function parse()
 
             arturl = find( line, "\"videoPreviewURL\":\"([^\"]*)\"")
             name = find( line, "\"videoTitle\":\"([^\"]*)\"")
+            if name then
+                name = string.gsub( name, "+", " " )
+            end
             description = find( line, "\"videoDescription\":\"([^\"]*)\"")
+            if description then
+                description = string.gsub( description, "+", " " )
+            end
 
            --[[ we get a list of different streams available, at various codecs
                 and resolutions:



More information about the vlc-commits mailing list