After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722820 - Add Radio France source
Add Radio France source
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
git master
Other All
: Normal enhancement
: ---
Assigned To: grilo-maint
grilo-maint
Depends on: 711243
Blocks:
 
 
Reported: 2014-01-23 07:22 UTC by Bastien Nocera
Modified: 2014-02-25 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
grl-franceinter.lua (3.87 KB, text/plain)
2014-02-14 01:24 UTC, Bastien Nocera
  Details
grl-radiofrance.lua (3.96 KB, text/plain)
2014-02-14 08:28 UTC, Bastien Nocera
  Details
grl-radiofrance.lua (3.82 KB, text/plain)
2014-02-18 11:22 UTC, Bastien Nocera
  Details
radiofrance: Add Radio France source (5.17 KB, patch)
2014-02-25 11:44 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-01-23 07:22:35 UTC
This would list the state-owned French radios, using:
http://app2.radiofrance.fr/rfdirect/config/Radio.js
as the list of radios.

This second file will list local radios:
http://app2.radiofrance.fr/rfdirect/config/FranceBleu.js
Comment 1 Bastien Nocera 2014-02-14 01:24:07 UTC
Created attachment 269089 [details]
grl-franceinter.lua

- I couldn't figure out how to use the json parser
- All items seem to end up being "boxes" instead of audio and the mime type is ignored.
- The source icon isn't actually set
Comment 2 Bastien Nocera 2014-02-14 08:28:41 UTC
Created attachment 269097 [details]
grl-radiofrance.lua

The "boxes" problem is solved, it's a bug in the lua-library code as mentioned in the review on the blocker.

The source is also missing a way to set the supported-media.
Comment 3 Victor Toso 2014-02-18 03:38:39 UTC
Sorry about the 'boxes' bug, should be solved by now.
I forgot to set supported-media. I'll do later this week. [Probably with others suggestions ?]

A suggestion about the lua-source. I don't know if I've expressed myself well on IRC but, you can 'run' a string as lua code inside your source.
e.g. change what is necessary in Radio.js to become a table-string and then run it to become a real table.

function radiofrance_fetch_cb(feed)
  feed = feed:match("{.-(radio.+)}")
  feed = feed:gsub("'([%w_]+)'%s:", "%1 :")
  feed = feed:gsub("%s:", " =")
  load(feed)()
  print(radio.FranceInter.mp3_direct.hifi)
end
Comment 4 Bastien Nocera 2014-02-18 11:22:26 UTC
Created attachment 269533 [details]
grl-radiofrance.lua
Comment 5 Bastien Nocera 2014-02-25 11:44:13 UTC
Created attachment 270256 [details] [review]
radiofrance: Add Radio France source
Comment 6 Bastien Nocera 2014-02-25 11:46:10 UTC
Attachment 270256 [details] pushed as 399ed9c - radiofrance: Add Radio France source