rc2dev/pifi-radio

Add support for a radio logo

Closed this issue · 2 comments

It would be nice to have the radio logo shown instead of the default icon underneath the radio name in the player. Not sure how this would be pulled from? Probably using an optional field in the streams.json file?

Hi, Florent!

I've definitely considered doing that. However, we need a big change in our rather simple streams file to include a logo field. Some paths I've thought are:

  1. Keep it as JSON, but each radio is an object, making it extensible. Something like this:
[
  {
    "name": "Radio 1",
    "streamUrl": "https://example.com/stream1",
    "category": "Talk radio"
    "logo": "https://example.com/logo"
  },

  {
    "name" ...

Not a big fan of this solution, as the file would grow complex to type and error-prone.

  1. Switch for a more human-friendly format such as toml or yaml.

This could do it, but I'd rather stick to a more standard format for streams.

  1. Use the M3U8 format.

This is probably the route I would take. It is still more complex to type than the current simple JSON, but users will be able to use third-party lists easily, or generate one automatically through common enough software.

The problem here is that I'm not aware of any Ruby library to parse M3U8. There is m3u8, but it targets HLS, and as far as I've looked at it, doesn't parse fields such as tvg-logo.

I'm closing this, as it is not actionable right now. Thanks for the input!