commit 0bdbb148e5bfe5135abd68d0eb7ee77defb628b0 parent 2b742bd2cdbefafe29ebd35ba0c1e4b22c593916 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Fri, 28 Feb 2020 11:19:00 +0100 Use radio:// identifier for http streams Diffstat:
M | .local/bin/plumb | | | 6 | ++++-- |
M | .local/share/radio-stations.txt | | | 22 | +++++++++++----------- |
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/.local/bin/plumb b/.local/bin/plumb @@ -92,8 +92,10 @@ handle_target() { if regeximatch "$t" '\.(mp4|mkv|webm|avi|ogv|gifv)$'; then detach mpv "$(fetch "$t")" - elif regeximatch "$t" '\.(mp3|ogg)$'; then - mpv "$(fetch "$t")" + elif regeximatch "$t" '^radio://'; then + mpv "http${t##radio}" + elif regeximatch "$t" '\.(mp3|ogg|m3u)$'; then + mpv "$t" elif regeximatch "$t" '\.(png|jpg|jpeg|tif|bmp|gif)$'; then sxiv "$(fetch "$t")" elif regeximatch "$t" '\.(pdf|ps|epub|djvu)$'; then diff --git a/.local/share/radio-stations.txt b/.local/share/radio-stations.txt @@ -1,11 +1,11 @@ -bitreich http://bitreich.org:3232/live -2f30 blue https://radio.2f30.org:8443/blue.mp3 -2f30 red https://radio.2f30.org:8443/red.mp3 -DR P1 http://live-icy.gss.dr.dk/A/A03H.mp3.m3u -DR P2 http://live-icy.gss.dr.dk/A/A04H.mp3.m3u -DR P3 http://live-icy.gss.dr.dk/A/A05H.mp3.m3u -DR P4 Østjylland http://live-icy.gss.dr.dk/A/A14H.mp3.m3u -DR P5 Østjylland http://live-icy.gss.dr.dk/A/A24H.mp3.m3u -DR P6 Beat http://live-icy.gss.dr.dk/A/A29H.mp3.m3u -DR P8 Jazz http://live-icy.gss.dr.dk/A/A22H.mp3.m3u -WBGO http://wbgo.streamguys.net/wbgo128 +bitreich radio://bitreich.org:3232/live +2f30 blue radio://radio.2f30.org:8443/blue.mp3 +2f30 red radio://radio.2f30.org:8443/red.mp3 +DR P1 radio://live-icy.gss.dr.dk/A/A03H.mp3.m3u +DR P2 radio://live-icy.gss.dr.dk/A/A04H.mp3.m3u +DR P3 radio://live-icy.gss.dr.dk/A/A05H.mp3.m3u +DR P4 Østjylland radio://live-icy.gss.dr.dk/A/A14H.mp3.m3u +DR P5 Østjylland radio://live-icy.gss.dr.dk/A/A24H.mp3.m3u +DR P6 Beat radio://live-icy.gss.dr.dk/A/A29H.mp3.m3u +DR P8 Jazz radio://live-icy.gss.dr.dk/A/A22H.mp3.m3u +WBGO radio://wbgo.streamguys.net/wbgo128