62 lines
3.0 KiB
Markdown
62 lines
3.0 KiB
Markdown
# Radios de Vigo (service.radios.vigo)
|
||
|
||
Kodi add-on that adds the radio stations on Vigo's FM dial and news radio from
|
||
the UK, US and Portugal to Kodi's **Radio** section, with logos and groups:
|
||
|
||
| Group | Channel numbers |
|
||
|---|---|
|
||
| Vigo (Spanish and the Portuguese ones from Valença) | the FM frequency, e.g. 100.6 = SER Radio Vigo |
|
||
| Noticias · Reino Unido | 201–205 (BBC Radio 4, World Service, 5 Live, Times Radio, LBC News) |
|
||
| Noticias · EUA | 301–305 (NPR, WNYC, WBUR, KQED, Bloomberg Radio) |
|
||
| Noticias · Portugal | 401–402 (TSF, Observador) + Antena 1 (98.2) |
|
||
|
||
Religious stations (Radio María, Radio Vaticano, La Voz de Fátima, COPE, Rádio
|
||
Renascença, …) are left out on purpose.
|
||
|
||
## How it works
|
||
|
||
`service.py` runs when Kodi starts and after each update. It writes an
|
||
IPTV Simple instance (`instance-settings-95.xml`, or the next free number)
|
||
that reads `resources/radio.m3u` and `resources/logos/` from the add-on
|
||
folder, and restarts IPTV Simple (only when nothing is playing) if the
|
||
station list changed. On the first run it turns on *Use channel numbers from
|
||
backend* + *always*, so the frequencies show as channel numbers and KodiMov+
|
||
keeps Movistar's TV numbers.
|
||
|
||
## Programme guide
|
||
|
||
`resources/lib/epg.py` builds `epg.xml` in the add-on's profile folder when
|
||
Kodi starts and then every 6 hours (30 minutes after a failed source). A
|
||
source that fails keeps its previous programmes (`guide.json`). IPTV Simple
|
||
reloads the list and the guide every hour, which is when Kodi takes it.
|
||
|
||
| Stations | Source |
|
||
|---|---|
|
||
| BBC Radio 4, World Service, 5 Live | BBC RMS schedule API (`rms.api.bbc.co.uk`) |
|
||
| LBC News | epgshare01 UK guide (`epg_ripper_UK1.xml.gz`) |
|
||
| Antena 1, 2, 3 | RTP EPG JSON (`rtp.pt/EPG/json/rtp-channels-page/list-grid/radio/<1-3>/...`) |
|
||
| RNE, Radio 3, Radio 5, Radio Clásica | RTVE guide pages (`rtve.es/play/guia-rne/<slug>/`) |
|
||
| WBUR | WBUR weekly schedule (`api.wbur.org/schedule`) |
|
||
|
||
No usable source yet: CRTVG (built in JavaScript), SER (blocks scripts),
|
||
Onda Cero, esRadio, Radio Marca, WNYC, KQED, NPR, Times Radio, TSF, Observador
|
||
and the music stations. To add one, write a function in `epg.py` and map the
|
||
station's tvg-id in `CHANNELS`. Test with
|
||
`python3 -I resources/lib/epg.py /tmp/epg.xml`.
|
||
|
||
Uninstalling the add-on leaves that instance behind: remove it in
|
||
IPTV Simple's settings (or delete the instance file).
|
||
|
||
## Changing stations
|
||
|
||
1. Edit `tools/stations.txt`.
|
||
2. `python3 -I tools/check.py` tests every stream with ffprobe.
|
||
3. `python3 -I tools/build.py` writes `resources/radio.m3u` and fetches missing logos.
|
||
4. Raise `version` in `addon.xml` (and add a `<news>` line), commit, push to `main`.
|
||
5. Pushing to `main` doesn't publish by itself: dispatch the skin repo's
|
||
`kodi-repo.yml` workflow (or wait for its daily run), which puts the new
|
||
version in repository.xocko. Boxes then update it like any other add-on
|
||
(`kodi-send -a "UpdateAddonRepos(true)"`).
|
||
|
||
`tools/` and this README aren't in the add-on (`.gitattributes` export-ignore).
|