]> git.sesse.net Git - vlc/blobdiff - share/lua/sd/freebox.lua
Revert "Lua SD: let the user know we are working"
[vlc] / share / lua / sd / freebox.lua
index 849217ac54c72e349030b72df6e4238bcc746bb0..a908648ef08f8e11fe45ba6af32bf8bc67fec409 100644 (file)
@@ -2,7 +2,7 @@
  $Id$
 
  Copyright © 2010 VideoLAN and AUTHORS
+
  Authors: Fabio Ritrovato <sephiroth87 at videolan dot org>
 
  This program is free software; you can redistribute it and/or modify
@@ -25,7 +25,11 @@ function descriptor()
 end
 
 function main()
-    local fd = vlc.stream( "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u" )
+    local fd, msg = vlc.stream( "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u" )
+    if not fd then
+        vlc.msg.warn(msg)
+        return nil
+    end
     local line=  fd:readline()
     if line ~= "#EXTM3U" then
         return nil
@@ -40,7 +44,7 @@ function main()
             _, _, option = string.find( line, ":(.+)" )
             table.insert( options, option )
         else
-            vlc.sd.add_item( {url=line,duration=duration,artist=artist,title=name,options=options} )
+            vlc.sd.add_item( {path=line,duration=duration,artist=artist,title=name,options=options} )
             duration = nil
             artist = nil
             name = nil