[vlc-commits] metachannels: fix playlist script too

Pierre Ynard git at videolan.org
Sun Feb 12 03:02:54 CET 2012


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Feb 12 03:02:47 2012 +0100| [33c3fd72a6a02eeb67866a4088e4287ff02c5f5b] | committer: Pierre Ynard

metachannels: fix playlist script too

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

 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], '&', '&' )
+            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



More information about the vlc-commits mailing list