France Musique main and thematic channels - experimental metadata

France Musique La Baroque is now available with some metadata in Roon - and no other streaming app :slight_smile:
Make sure you select the stream http://34.107.67.2:8000

I’ve decided for the field “artist” to concatenate “composer” and “interpret”. Let me know if you think it’s a good idea, and report any issue you see. Thx

2 Likes

Brilliant Rémi. Well done.

Concatenating composer and artists works well, I think.

1 Like

Thank you @BrianW, credits to you for the API link and @Sebastien for helping out with the code!
For the curious, here’s the Node Red architecture. Streaming software is Icecast2.

If there are other France Musique channels you’d like to see with metadata just say.

I think so too. I’ve just added a slash for clarity.

A ‘stroke’ of genius.

Here’s the code for reference, or in case my server crashes (no backup mechanism in place…):

[{"id":"99018659.dfb288","type":"tab","label":"FIP Metadata","disabled":false,"info":""},{"id":"543e72f1.6af0ec","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":420,"wires":[["2f50036.e7da9fc"]]},{"id":"2f50036.e7da9fc","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":420,"wires":[["ef090817.1ca768"],[]]},{"id":"47322614.aafe58","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":760,"y":380,"wires":[["a436efdb.d7984"]]},{"id":"a436efdb.d7984","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":380,"wires":[["c1a4ccd6.95551"],[]]},{"id":"c1a4ccd6.95551","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fip\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":380,"wires":[["6de36e11.751c5"]]},{"id":"6de36e11.751c5","type":"function","z":"99018659.dfb288","name":"PASSWORD","func":"msg.url = \"http://admin:HIDDENPASSWORD@34.107.67.2:8000/admin/metadata?mount=/\" + msg.radio + \"&mode=updinfo&song=\" + msg.payload;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1300,"y":380,"wires":[["7c53a5a0.ac4f0c"]]},{"id":"7c53a5a0.ac4f0c","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1520,"y":380,"wires":[[]]},{"id":"5ad40497.6ebbbc","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":460,"wires":[["cef87fc8.5d2cb"]]},{"id":"cef87fc8.5d2cb","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":460,"wires":[["e2cd085c.81caf8"],[]]},{"id":"8a7c8269.f3403","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":500,"wires":[["134c569a.9943f9"]]},{"id":"134c569a.9943f9","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":500,"wires":[["e5bd97d1.0d64e8"],[]]},{"id":"e1ca124e.df5f3","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":540,"wires":[["23f62a0b.695056"]]},{"id":"23f62a0b.695056","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":540,"wires":[["6828f0df.48b0b"],[]]},{"id":"ef090817.1ca768","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fiprock\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":420,"wires":[["6de36e11.751c5"]]},{"id":"e2cd085c.81caf8","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fipjazz\";\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":460,"wires":[["6de36e11.751c5"]]},{"id":"e5bd97d1.0d64e8","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fipgroove\";\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":500,"wires":[["6de36e11.751c5"]]},{"id":"6828f0df.48b0b","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fipmonde\";\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":540,"wires":[["6de36e11.751c5"]]},{"id":"7d22b5e1.f205bc","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":580,"wires":[["8afed35d.17f9f"]]},{"id":"8afed35d.17f9f","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":580,"wires":[["bc6584de.700778"],[]]},{"id":"bc6584de.700778","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fipnouveaute\";\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":580,"wires":[["6de36e11.751c5"]]},{"id":"7f994e92.846b9","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":620,"wires":[["19954ea0.f8dce1"]]},{"id":"19954ea0.f8dce1","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":620,"wires":[["9d980364.72f7c"],[]]},{"id":"9d980364.72f7c","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fipreggae\";\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":620,"wires":[["6de36e11.751c5"]]},{"id":"8128c80a.ca6708","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":660,"wires":[["33bca798.833688"]]},{"id":"33bca798.833688","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":660,"wires":[["ddbaf57d.01ea78"],[]]},{"id":"ddbaf57d.01ea78","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fipelectro\";\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":660,"wires":[["6de36e11.751c5"]]},{"id":"27572793.7aad68","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.title == null)\n  msg.payload.data.now.playing_item.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":760,"y":700,"wires":[["9659295f.af02c8"]]},{"id":"9659295f.af02c8","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":700,"wires":[["bd2ff86b.f72548"],[]]},{"id":"bd2ff86b.f72548","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item;\nvar artist = playing_item.title;\nartist = encodeURIComponent(artist);\nvar title = playing_item.subtitle;\ntitle = encodeURIComponent (title);\nmsg.payload = artist + \"%20-%20\" + title;\nmsg.radio = \"fippop\";\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":700,"wires":[["6de36e11.751c5"]]},{"id":"48b5d4c8.3d6aec","type":"inject","z":"99018659.dfb288","name":"FIP","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A7%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"str","x":70,"y":380,"wires":[["84d64ae3.1362d8"]]},{"id":"84d64ae3.1362d8","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":370,"y":380,"wires":[["b92af0ea.d8e6c"]]},{"id":"b92af0ea.d8e6c","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":380,"wires":[["47322614.aafe58"]]},{"id":"7a77188f.9d0188","type":"inject","z":"99018659.dfb288","name":"FIP Rock","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A64%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":80,"y":420,"wires":[["5eea6b3c.10db64"]]},{"id":"5eea6b3c.10db64","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":420,"wires":[["9313c96f.8a3d38"]]},{"id":"9313c96f.8a3d38","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":420,"wires":[["543e72f1.6af0ec"]]},{"id":"a1c814d8.c1d888","type":"inject","z":"99018659.dfb288","name":"FIP Jazz","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A65%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":80,"y":460,"wires":[["30d70204.e8b6de"]]},{"id":"30d70204.e8b6de","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":460,"wires":[["33d6bf46.5feb7"]]},{"id":"33d6bf46.5feb7","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":460,"wires":[["5ad40497.6ebbbc"]]},{"id":"d3fabfa2.220c1","type":"inject","z":"99018659.dfb288","name":"FIP Groove","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A66%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":90,"y":500,"wires":[["9611f4ec.e4f658"]]},{"id":"9611f4ec.e4f658","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":500,"wires":[["d102772a.013ae8"]]},{"id":"d102772a.013ae8","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":500,"wires":[["8a7c8269.f3403"]]},{"id":"41fb2a0e.8f19b4","type":"inject","z":"99018659.dfb288","name":"FIP World","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A69%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":90,"y":540,"wires":[["ea74f6f5.315278"]]},{"id":"ea74f6f5.315278","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":540,"wires":[["10783f78.def4a1"]]},{"id":"10783f78.def4a1","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":540,"wires":[["e1ca124e.df5f3"]]},{"id":"bcfec68e.27e548","type":"inject","z":"99018659.dfb288","name":"FIP Nouveauté","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A70%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":580,"wires":[["fc8356a0.0f6f08"]]},{"id":"fc8356a0.0f6f08","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":580,"wires":[["23125ac7.bcc376"]]},{"id":"23125ac7.bcc376","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":580,"wires":[["7d22b5e1.f205bc"]]},{"id":"9ad0528a.e792","type":"inject","z":"99018659.dfb288","name":"FIP Reggae","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A71%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":90,"y":620,"wires":[["4f82e7ed.31e3d8"]]},{"id":"4f82e7ed.31e3d8","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":620,"wires":[["f1e67649.776ca8"]]},{"id":"f1e67649.776ca8","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":620,"wires":[["7f994e92.846b9"]]},{"id":"8885706e.3af81","type":"inject","z":"99018659.dfb288","name":"FIP Electro","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A74%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":90,"y":660,"wires":[["6f196e2d.858fc"]]},{"id":"6f196e2d.858fc","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":660,"wires":[["79338f3d.e691c"]]},{"id":"79338f3d.e691c","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":660,"wires":[["8128c80a.ca6708"]]},{"id":"a3db2b6c.3fa7b8","type":"inject","z":"99018659.dfb288","name":"FIP POP","props":[{"p":"url","v":"https://www.fip.fr/latest/api/graphql?operationName=Now&variables=%7B%22bannerPreset%22%3A%22600x600-noTransform%22%2C%22stationId%22%3A78%2C%22previousTrackLimit%22%3A3%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%228a931c7d177ff69709a79f4c213bd2403f0c11836c560bc22da55628d8100df8%22%7D%7D","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"str","x":80,"y":700,"wires":[["40f40d34.f89464"]]},{"id":"40f40d34.f89464","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":370,"y":700,"wires":[["72656523.22008c"]]},{"id":"72656523.22008c","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":700,"wires":[["27572793.7aad68"]]},{"id":"5b0f0a04.c61cc4","type":"function","z":"99018659.dfb288","name":"","func":"if (msg.payload.data.now.playing_item.song.title == null)\n  msg.payload.data.now.playing_item.song.title = \"\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":760,"y":740,"wires":[["2ff91829.307758"]]},{"id":"2ff91829.307758","type":"function","z":"99018659.dfb288","name":"","func":"msg.topic = \"/metadata\";\n\nvar playing_item = msg.payload.data.now.playing_item.song;\nvar artist = playing_item.subtitle;\nartist = encodeURIComponent(artist);\nvar title = playing_item.title;\ntitle = encodeURIComponent (title);\nvar composer = playing_item.compositors;\ncomposer = encodeURIComponent (composer);\nmsg.payload = composer + \"%20/%20\" + artist + \"%20-%20\" + title;\nmsg.radio = \"francemusiquelabaroque\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":740,"wires":[["6de36e11.751c5"]]},{"id":"fd076964.73baf8","type":"inject","z":"99018659.dfb288","name":"France Musique La Baroque","props":[{"p":"url","v":"https://www.francemusique.fr/latest/api/graphql?operationName=Now&variables={%22first%22%3A10%2C%22after%22%3A%22%22%2C%22stationId%22%3A408%2C%22preset%22%3A%22300-noTransform%22}&extensions={%22persistedQuery%22%3A{%22version%22%3A1%2C%22sha256Hash%22%3A%2229336c79311714dbc36a9149d2b93c698a744d6d9b2c0fd57fe6d4bb98c32f61%22}}","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":150,"y":740,"wires":[["4d7f6f3f.b56ef"]]},{"id":"4d7f6f3f.b56ef","type":"http request","z":"99018659.dfb288","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":370,"y":740,"wires":[["f829f890.ab23c8"]]},{"id":"f829f890.ab23c8","type":"json","z":"99018659.dfb288","name":"","property":"payload","action":"","pretty":false,"x":570,"y":740,"wires":[["5b0f0a04.c61cc4"]]},{"id":"b93b3f08.a45fa","type":"switch","z":"99018659.dfb288","name":"","property":"payload.data.now.song.__typename","propertyType":"msg","rules":[{"t":"eq","v":"SongOnAir","vt":"str"},{"t":"eq","v":"TimelineItem","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":700,"wires":[[],[]]}]

France Musique Classique Easy metadata added this morning. Other France Musique channels will follow.

Thank you for this. It is wonderful to have the metadata - I am listening in Australia. I have added the other France Musique stations in anticipation of being able to get the metadata.

If you’re up for experimenting, try France Musique Musique du Monde Ocora channel. If your ears are wide-ranging, you’ll be amazed.

I have just added metadata streams for all France Musique channels (except for France Musique main channel, cannot get it right). I had no time to test yet so there are probably bugs and glitches, just report them here. Make sure the stream starting with http:34… is the default one.

1 Like

They all appear to be working. Thank you for doing this!

Please note I had to deactivate temporarily France Musique Ocora, La Contemporaine, Concerts and La B.O. The free Google Compute virtual machine I have deployed (1 core@900Mhz) has reached its limit and cannot process and redistribute all 16 FIP and France Musique streams.
It should go better once I have repurposed an old Intel Nuc at home dedicated to this service

1 Like

alec_eiffel - Thanks for all your effort and for devoting personal processing to this.

I’m over my head here computer-wise, but could Roon take over this function on their server or could there be a way for users to download a utility for the processing to be decentralized?

France Musique main channel is now live with metadata!

EDIT : all FIP and France Musique metadata streams are now available as “default stream”, no need to change any setting to get them. @BrianW: I am not proud of this but prioritisation of metadata streams was achieved by changing AAC bitrate from 192kHz to 193kHz… Let me know if this is in breach with the Internet Radio DIrectory T&Cs :slight_smile:

3 Likes

Last week, France Musique strengthened the GraphQL syntax rules for API queries. Some special characters like “{” or “}” are now disallowed and had to be replaced with percent encoding.
Here’s the updated Node Red code for those interested: https://www.dropbox.com/s/2g7bjllpsmx9jkj/FIP%20-%20France%20Musique%20-%20Metadata.txt?dl=0
All 8 FIP stations, 9 France Musique stations and France Inter are now back 100% with metadata in your Roon client!

1 Like

Discussion can continue here, merging FIP and France Musique into a broader “Radio France metadata” thread.

This one can be closed.