]> git.sesse.net Git - vlc/blobdiff - share/lua/meta/fetcher/tvrage.lua
Change vlc.stream() and vlc.memory_stream() error reporting to behave like lua's...
[vlc] / share / lua / meta / fetcher / tvrage.lua
index 46c9df0bd17fa54531fdc4215d96906fd4129c8f..22a391d986fdeafd9628dbc4f47496e6e3070c34 100644 (file)
@@ -46,6 +46,7 @@ function fetch_meta()
     end
 
     local fd = vlc.stream("http://services.tvrage.com/feeds/search.php?show=" .. get_query(showName))
+    if not fd then return nil end
     local page = fd:read( 65653 )
     fd = nil
     _, _, showid = string.find( page, "<showid>(.-)</showid>" )
@@ -54,6 +55,7 @@ function fetch_meta()
     end
 
     fd = vlc.stream("http://services.tvrage.com/feeds/full_show_info.php?sid=" .. showid)
+    if not fd then return nil end
     page = fd:read( 65653 )
     fd = nil
     _, _, season = string.find(page, "<Season no=\""..seasonNumber.."\">(.-)</Season>")