[grilo-plugins] lua-factory: port grl-radiofrance.lua to the new lua system
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] lua-factory: port grl-radiofrance.lua to the new lua system
- Date: Sat, 30 Jan 2016 11:24:38 +0000 (UTC)
commit 93547ac94797cdea6670b0d458e838bcdb578f77
Author: George Sedov <radist morse gmail com>
Date: Wed Dec 16 18:26:56 2015 +0300
lua-factory: port grl-radiofrance.lua to the new lua system
https://bugzilla.gnome.org/show_bug.cgi?id=753141
Acked-by: Victor Toso <me victortoso com>
src/lua-factory/sources/grl-radiofrance.lua | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/lua-factory/sources/grl-radiofrance.lua b/src/lua-factory/sources/grl-radiofrance.lua
index 28da27b..ddbea83 100644
--- a/src/lua-factory/sources/grl-radiofrance.lua
+++ b/src/lua-factory/sources/grl-radiofrance.lua
@@ -40,16 +40,16 @@ source = {
-- Source utils --
------------------
-function grl_source_browse(media_id)
- if grl.get_options("skip") > 0 then
- grl.callback()
+function grl_source_browse(media, options, callback)
+ if options.skip > 0 then
+ callback()
else
local urls = {}
for index, item in pairs(stations) do
local url = 'http://www.' .. item .. '.fr/player'
table.insert(urls, url)
end
- grl.fetch(urls, "radiofrance_now_fetch_cb")
+ grl.fetch(urls, radiofrance_now_fetch_cb, callback)
end
end
@@ -58,13 +58,13 @@ end
------------------------
-- return all the media found
-function radiofrance_now_fetch_cb(results)
+function radiofrance_now_fetch_cb(results, callback)
for index, result in pairs(results) do
local media = create_media(stations[index], result)
- grl.callback(media, -1)
+ callback(media, -1)
end
- grl.callback()
+ callback()
end
-------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]