[vlc-commits] dailymotion.lua: strip website tag appended to video title

Pierre Ynard git at videolan.org
Sun Jan 27 00:35:04 CET 2019


vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Jan 27 00:22:43 2019 +0100| [6de3a6e2bf7ab6416dcdc8c8e803f731052d8a4c] | committer: Pierre Ynard

dailymotion.lua: strip website tag appended to video title

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

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

 share/lua/playlist/dailymotion.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/share/lua/playlist/dailymotion.lua b/share/lua/playlist/dailymotion.lua
index f117b0d5de..59be95fc03 100644
--- a/share/lua/playlist/dailymotion.lua
+++ b/share/lua/playlist/dailymotion.lua
@@ -36,6 +36,7 @@ function parse()
 		if string.match( line, "<meta property=\"og:title\"" ) then
 			_,_,name = string.find( line, "content=\"(.-)\"" )
 			name = vlc.strings.resolve_xml_special_chars( name )
+			name = string.gsub( name, " %- Vidéo dailymotion$", "" )
 		end
 		if string.match( line, "<meta name=\"description\"" ) then
 			_,_,description = string.find( line, "content=\"(.-)\"" )



More information about the vlc-commits mailing list