[grilo-plugins] radiofrance: Work even when EPG service is down



commit 4d8746f29996c348d7e8e4a0f4b1318a7ffcafd6
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Sep 4 11:52:14 2014 +0200

    radiofrance: Work even when EPG service is down
    
    The rest of the radio service might still be available, as it
    is now.

 src/lua-factory/sources/grl-radiofrance.lua |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/lua-factory/sources/grl-radiofrance.lua b/src/lua-factory/sources/grl-radiofrance.lua
index 749f890..68370ba 100644
--- a/src/lua-factory/sources/grl-radiofrance.lua
+++ b/src/lua-factory/sources/grl-radiofrance.lua
@@ -69,12 +69,10 @@ function radiofrance_now_fetch_cb(results)
     if not json or json.stat == "fail" or not json.stations then
       local url = 'http://www.' .. stations[index] .. '.fr/api/now&full=true'
       grl.warning ('Could not fetch ' .. url .. ' failed')
-      grl.callback()
-      return
+    else
+      local media = create_media(stations[index], json.stations[1])
+      grl.callback(media, -1)
     end
-
-    local media = create_media(stations[index], json.stations[1])
-    grl.callback(media, -1)
   end
 
   grl.callback()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]