Files
radios-vigo/README.md
T
2026-11-12 22:29:02 +01:00

62 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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. Install on a box: the repo is private and the add-on isn't in
repository.xocko yet, so copy it by hand (Kodi then runs the service again
after `Addons.SetAddonEnabled` false/true):
`git archive HEAD | ssh root@<box> 'tar -xf - -C /storage/.kodi/addons/service.radios.vigo'`
`tools/` and this README aren't in the add-on (`.gitattributes` export-ignore).