Jump to content


Member Since 16 Aug 2017
Offline Last Active Yesterday, 17:19

#1475328 Bash script for creating bouquet list from webradio api

Posted by eura on 21 August 2022 - 14:59

Just made a quick bash script for creating bouquet files asking http://de1.api.radio...o/#List_of_tags api:s base on music style since I like to use the bouquet than I don’t need to have the Tv on for changing channels. Enjoy

As I say it was quick made so it can be improved! But working.

read -p 'Enter music style : ' tag
wget -O $dest/radio_search.tmp http://de1.api.radio-browser.info/json/tags/$tag
cat $dest/radio_search.tmp| sed 's/","/\n/g'| sed 's/stationcount"://'| sed 's/},{"name":"/\t/'
read -p 'Choose one of the above choices : ' tag
wget -O $dest/radio_search.tmp http://de1.api.radio-browser.info/json/stations/bytag/$tag
cat -n $dest/radio_search.tmp | sed 's/","/\n/g'| grep "url\""|sed 's/url\"\:\"//g'>$dest/radio_url.tmp
cat -n $dest/radio_search.tmp | sed 's/","/\n/g'| grep "name\""|sed 's/name\"\:\"//g'>$dest/radio_name.tmp
cat -n $dest/radio_search.tmp | sed 's/","/\n/g'| grep "language\""|sed 's/language\"\:\"//g'>$dest/radio_language.tmp
cat -n $dest/radio_search.tmp | sed 's/","/\n/g'| grep "bitrate\""|sed 's/bitrate\"\:\"//g'|sed 's/,"hls*.*//'|sed 's/"//'>$dest/radio_bitrate.tmp
sed -i 's/:/%3a/g' $dest/radio_url.tmp
sed -i 's/^/#SERVICE 4097:0:2:0:100D:0:0:0:0:0:/' $dest/radio_url.tmp
sed -i 's|$|:|' $dest/radio_url.tmp
# Add #DESCRIPTIO lang and bitrate to name file
sed -i 's/^/#DESCRIPTION /' $dest/radio_name.tmp 
paste -d ":" $dest/radio_name.tmp $dest/radio_language.tmp>$dest/radio_name.tmp1
paste -d ":" $dest/radio_name.tmp1 $dest/radio_bitrate.tmp>$dest/radio_name.tmp2
read -p 'Enter name for the new bouquet file. userbouquet.???????.radio: ' name
# Merge Url and name to one file
echo "#NAME $name">$dest/userbouquet.$name.radio
paste -d \\n $dest/radio_url.tmp $dest/radio_name.tmp2>>$dest/userbouquet.$name.radio
# Delete low bitrate 32,48,56,64,96 and the line above
sed -i 's/bitrate:32$/remove/' $dest/userbouquet.$name.radio
sed -i 's/bitrate:48$/remove/' $dest/userbouquet.$name.radio
sed -i 's/bitrate:56$/remove/' $dest/userbouquet.$name.radio
sed -i 's/bitrate:64$/remove/' $dest/userbouquet.$name.radio
sed -i 's/bitrate:96$/remove/' $dest/userbouquet.$name.radio
sed -i 'N;/remove/!P;D' $dest/userbouquet.$name.radio
no=$(cat $dest/userbouquet.$name.radio| wc -l)
let "no=($no-1)/2"; echo Adding $no stations to /etc/enigma2/userbouquet.$name.radio
read -p 'yes/no ? : ' i
if [[ "$i" == "yes" ]]; then
    mv $dest/userbouquet.$name.radio /etc/enigma2/userbouquet.$name.radio
    echo "Reload userbouquet "
    wget -qO - ""
rm -rf $dest/radio_*.tmp* 
rm -rf $dest/userbouquet.$name.radio 



#1430125 Net speed test plugin

Posted by eura on 14 February 2022 - 22:00

I just made i simple, associated this "script" to hotkeys :)

wget -O - https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python


#862400 Epg import

Posted by eura on 27 March 2018 - 11:31

Here is the Faq https://forums.openp...d-xmltv-import/ look at


* Where is epg.dat stored and how to change it.


You can set the storage device for the epg.dat file by editing the settings file in /etc/enigma2 when enigma is stopped.

init 4  (to stop enigma)

edit now /etc/enigma2/settings – add or change

config.misc.epgcache_filename=/media/usb/epg.dat  (or another location to your choice)

init 3 (to restart enigma)