vlc/vlc-2.0 | branch: master | Pierre Ynard <[email protected]> | Sun Feb 12 
03:02:47 2012 +0100| [8543f71ea08473375ef53205215cefb8680bfb6e] | committer: 
Pierre Ynard

metachannels: fix playlist script too
(cherry picked from commit 33c3fd72a6a02eeb67866a4088e4287ff02c5f5b)

Signed-off-by: Pierre Ynard <[email protected]>

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

 share/lua/playlist/metachannels.lua |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/share/lua/playlist/metachannels.lua 
b/share/lua/playlist/metachannels.lua
index 2e2b7d6..06d86d1 100644
--- a/share/lua/playlist/metachannels.lua
+++ b/share/lua/playlist/metachannels.lua
@@ -43,9 +43,14 @@ function parse()
         if( item.name == 'item' ) then
             simplexml.add_name_maps( item )
             local url = string.gsub( item.children_map['link'][1].children[1], 
'&amp;', '&' )
+            local title = item.children_map['title'][1].children[1]
+            local arturl = nil
+            if item.children_map['media:thumbnail'] then
+                arturl = 
item.children_map['media:thumbnail'][1].attributes['url']
+            end
             table.insert( tracks, { path = url,
-                                    title = 
item.children_map['title'][1].children[1],
-                                    arturl = 
item.children_map['media:thumbnail'][1].attributes['url'],
+                                    title = title,
+                                    arturl = arturl,
                                     options = {':play-and-pause'} } )
         end
     end

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to