[vlc-devel] commit: frenchtv.lua: Make sure we handle channels name like "XXX HD" or " XXX ( bas débit )" (Pierre d'Herbemont )

git version control git at videolan.org
Sat Jan 16 18:26:14 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sat Jan 16 12:58:45 2010 +0100| [d36e4117613f34369619549df85e31fd1ac3ec9f] | committer: Pierre d'Herbemont 

frenchtv.lua: Make sure we handle channels name like "XXX HD" or "XXX (bas débit)"

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

 share/lua/meta/art/02_frenchtv.lua |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/share/lua/meta/art/02_frenchtv.lua b/share/lua/meta/art/02_frenchtv.lua
index 1125800..268b8bf 100644
--- a/share/lua/meta/art/02_frenchtv.lua
+++ b/share/lua/meta/art/02_frenchtv.lua
@@ -41,6 +41,12 @@ function fetch_art()
         channel = meta["filename"]
     end
 
+    -- Replace "France 2 HD" by "France 2"
+    channel = string.gsub(channel, "^(.-)%sHD%s*$", "%1")
+
+    -- Replace "France 2 (bas débit)" by "France 2"
+    channel = string.gsub(channel, "^(.-)%s%(bas débit%)%s*$", "%1")
+
     -- trim
     channel = string.gsub(channel, "^%s*(.-)%s*$", "%1")
 




More information about the vlc-devel mailing list