Page 1 of 1
YRadio internet radio player
Posted: Sun Dec 04, 2022 4:45 pm
by fredx181
YRadio internet radio player for KLV-Airedale, xbps package;
Not sure if this is final version, possibly may need some improvements.
See also:
viewtopic.php?p=74256#p74256
(ignore the warnings about the yad version, works OK with the yad included in KLV)
Re: YRadio internet radio player
Posted: Wed Jan 04, 2023 2:32 pm
by fredx181
*** YRadio v1.4 xbps package ***
Major change is that searching is done now directly from http://all.api.radio-browser.info/
(so, no local index database is required anymore) see for more info my post here: viewtopic.php?p=76961#p76961
Other changes:
- Option to create new (empty) playlist (button "New")
- Add/Remove to/from a playlist
- Fixed button display for yad GTK3 (e.g. shows now "Close" instead of "gtk-close")
Dependencies: yad mpv jq xdotool (will be installed if not already) (edit: also curl is a dependency, but most likely installed already).
P.S. the 64-bit appimage from here works too on KLV (yad (gtk2) and jq included): viewtopic.php?p=77569#p77569
Re: YRadio internet radio player
Posted: Fri Jan 06, 2023 3:33 pm
by Sofiya
I love this receiver!!!
I generally like the things @fredx181 does
Re: YRadio internet radio player
Posted: Fri Jan 06, 2023 4:07 pm
by amethyst
Will this work on 32-bit Puppys. A .pet package perhaps?
Re: YRadio internet radio player
Posted: Fri Jan 06, 2023 4:16 pm
by fredx181
amethyst wrote: ↑Fri Jan 06, 2023 4:07 pm
Will this work on 32-bit Puppys. A .pet package perhaps?
This here is for KLV-Airedale, see here for to use on Puppy, 32-bit appimage: viewtopic.php?p=77569#p77569
Re: YRadio internet radio player
Posted: Fri Jan 06, 2023 5:25 pm
by amethyst
What is the command to resume from pause and then start recording immediately? I want to set a time to start recording and a time to stop (exit the application). Probably using pSchedule. A builtin scheduler will be great. BTW - Pause/Play button does not work for me (doesn't continue after pause). Have to double click the item to start play. Also seems that the stream is recorded (or is it just copied) at the same bitrate as the incoming stream. Is it possible to encode the incoming stream at a pre-selected bitrate?
Re: YRadio internet radio player
Posted: Fri Jan 06, 2023 7:00 pm
by fredx181
Re: YRadio internet radio player
Posted: Sat Jan 07, 2023 9:14 am
by step
fredx181 wrote: ↑Wed Jan 04, 2023 2:32 pm
*** YRadio v1.4 xbps package ***
Dependencies: yad mpv jq xdotool (will be installed if not already) (edit: also curl is a dependency, but most likely installed already).
yradio-1.4_0.noarch.xbps
P.S. the 64-bit appimage from here works too on KLV (yad (gtk2) and jq included): viewtopic.php?p=77569#p77569
Hi Fred, thanks for this player, I'm a new user and I'm enjoying yradio. Initially, I was dumb enough to keep clicking the "Double click to play" label, thinking that something would happen then eventually I realized my mistake
The online search is great. I can add that one can search the current radio list from yad itself, just press Ctrl+F when the cursor is in the list of stations. So, for instance, enter "german" in the search field, click "Load", wait for the list to update, select the first list item, press Ctrl+F and type something to restrict the search to items that start with that something.
I tested the 64 bit appimage, which failed with yad error message, unknown option --keep-icon-size. That option isn't available in yad 0.40, you need at least version 0.42.26 from https://github.com/step-/yad (gtk2, gtk3) or version 2.0 from https://github.com/v1cont/yad (gtk3 and higher).
I tested an unpacked xbps on Fatdog, and it worked well because the installed yad's version is greater than 0.42.26.
Side note: To catch the unknown option error on your system if you need to add ignore_unknown_options=false
to ~/.config/yad/yad.conf. The default value is true
false
, which makes the installed yad run in spite of not being able to honor an unknown option. Ignoring unknown options is OK for options that make a small difference, such as --keep-icon-size, but not OK for options that are indispensable to a script's purpose.
Re: YRadio internet radio player
Posted: Sat Jan 07, 2023 5:43 pm
by fredx181
Thanks @step for the info ! And glad to hear that you enjoy it.
The online direct search, on itself, I like it, but has some limitations (searching in 'name' value only, not for 'country'), see report here; viewtopic.php?p=77779#p77779
Looking for a workaround now to be able to search 'country' too.
Hi Fred, thanks for this player, I'm a new user and I'm enjoying yradio. Initially, I was dumb enough to keep clicking the "Double click to play" label, thinking that something would happen then eventually I realized my mistake
Sometimes I double click my head .... won't work either
Side note: To catch the unknown option error on your system if you need to add ignore_unknown_options=false to ~/.config/yad/yad.conf. The default value is false, which makes the installed yad run in spite of not being able to honor an unknown option.
Are you sure ? If I remove ~/.config/yad.conf (it's in ~/.config, not in ~/.config/yad/ for me, btw) and then run some yad application, it gets back with included: ignore_unknown_options=true
Re: YRadio internet radio player
Posted: Sat Jan 07, 2023 9:20 pm
by step
fredx181 wrote: ↑Sat Jan 07, 2023 5:43 pm
Side note: To catch the unknown option error on your system if you need to add ignore_unknown_options=false to ~/.config/yad/yad.conf. The default value is false, which makes the installed yad run in spite of not being able to honor an unknown option.
Are you sure ? If I remove ~/.config/yad.conf (it's in ~/.config, not in ~/.config/yad/ for me, btw) and then run some yad application, it gets back with included: ignore_unknown_options=true
I stand corrected, the default is ignore_unknown_options=true, which is what I meant to write to make sense with the rest of my original sentence. And, yes, it's ~/.config/yad.conf for me as well.
Re: YRadio internet radio player
Posted: Sun Jan 08, 2023 12:50 pm
by fredx181
*** YRadio v1.5 xbps package ***
Added choice to search for country, e.g. Australia, see for more info and also appimage here:
viewtopic.php?p=77868#p77868
Re: YRadio internet radio player
Posted: Wed Jan 25, 2023 8:43 pm
by fredx181
*** YRadio v1.6 xbps package ***
Syncing with development from here: https://forum.puppylinux.com/viewtopic. ... 345#p79345 (added list to choose from countries)
Bit of a challenge to make it display well with yad GTK3 for KLV but should be OK.
Re: YRadio internet radio player
Posted: Mon Aug 05, 2024 3:20 pm
by nik120s
add the code to the yradio file
Code: Select all
function info() {
sleep 3
vol=$(amixer get Master | grep "\[on\]")
vol=( $vol )
[ $(pidof pulseaudio) ] && CURVOL=$(echo ${vol[4]} | sed 's/[][%]//g') || CURVOL=$(echo ${vol[3]} | sed 's/[][%]//g')
TITLE="$(cat $HOME/.yradio/tmp/onclick | cut -c 1-50 2> /dev/null)"
# TITLE="$(cat /root/.yradio/tmp/metadata /root/.yradio/tmp/nowplay | tail -n2 | cut -c 1-50 2> /dev/null)"
BIGTITLE="<b><big>$TITLE \t $CURVOL%</big></b>"
yad --text "$BIGTITLE" --geometry "600x50-10-35" --undecorated --no-buttons --margins 5 --on-top --no-focus --skip-taskbar &
# exit--skip-taskbar &--timeout 120 sleep 6kill $!
PID=$!
if [ -f $HOME/.yradio/tmp/pid_info ]; then
kill $(cat $HOME/.yradio/tmp/pid_info) 2> /dev/null
echo "$PID" > $HOME/.yradio/tmp/pid_info
else
echo "$PID" > $HOME/.yradio/tmp/pid_info
fi
inot=$(pgrep 'inotifywait' | wc -l)
if [ "$inot" -gt 1 ]; then
kill $(pgrep 'inotifywait' | head -n -1 | tr "\n" " ")
fi
geometry=$(ps | grep -v grep | grep -e "geometry 600x50" | wc -l)
if [ "$geometry" -gt 1 ]; then
kill $(ps -eo pid,cmd | grep -v grep | grep -e "geometry 600x50" | awk '{ print $1 }' | head -n -1 | tr "\n" " ")
fi
}
export -f info
# tail -f /root/.yradio/tmp/metadata 2> /dev/null | info
while inotifywait -e modify $HOME/.yradio/tmp/metadata; do info & > dev/null; done
}
export -f play_url
before
}
export -f play_url
Re: YRadio internet radio player
Posted: Mon Aug 05, 2024 3:42 pm
by fredx181
nik120s wrote: ↑Mon Aug 05, 2024 3:20 pm
add the code to the yradio file
Code: Select all
function info() {
sleep 3
vol=$(amixer get Master | grep "\[on\]")
vol=( $vol )
[ $(pidof pulseaudio) ] && CURVOL=$(echo ${vol[4]} | sed 's/[][%]//g') || CURVOL=$(echo ${vol[3]} | sed 's/[][%]//g')
TITLE="$(cat $HOME/.yradio/tmp/onclick | cut -c 1-50 2> /dev/null)"
# TITLE="$(cat /root/.yradio/tmp/metadata /root/.yradio/tmp/nowplay | tail -n2 | cut -c 1-50 2> /dev/null)"
BIGTITLE="<b><big>$TITLE \t $CURVOL%</big></b>"
yad --text "$BIGTITLE" --geometry "600x50-10-35" --undecorated --no-buttons --margins 5 --on-top --no-focus --skip-taskbar &
# exit--skip-taskbar &--timeout 120 sleep 6kill $!
PID=$!
if [ -f $HOME/.yradio/tmp/pid_info ]; then
kill $(cat $HOME/.yradio/tmp/pid_info) 2> /dev/null
echo "$PID" > $HOME/.yradio/tmp/pid_info
else
echo "$PID" > $HOME/.yradio/tmp/pid_info
fi
inot=$(pgrep 'inotifywait' | wc -l)
if [ "$inot" -gt 1 ]; then
kill $(pgrep 'inotifywait' | head -n -1 | tr "\n" " ")
fi
geometry=$(ps | grep -v grep | grep -e "geometry 600x50" | wc -l)
if [ "$geometry" -gt 1 ]; then
kill $(ps -eo pid,cmd | grep -v grep | grep -e "geometry 600x50" | awk '{ print $1 }' | head -n -1 | tr "\n" " ")
fi
}
export -f info
# tail -f /root/.yradio/tmp/metadata 2> /dev/null | info
while inotifywait -e modify $HOME/.yradio/tmp/metadata; do info & > dev/null; done
}
export -f play_url
before
}
export -f play_url
Any explanation why ?
edit: tried it and it just adds an extra info notification (besides the already existing that shows for 5 sec) and it stays visible all the time, I see no point in that.
Also, when quitting yradio the notification stayed visible for me, removed it with xkill. Altogether not an improvement IMO, sorry.
Re: YRadio internet radio player
Posted: Tue Aug 06, 2024 12:20 pm
by nik120s
I am for myself. Is it possible to make it easier.
We need to add more.
on_exit
pkill notifywait
kill $(ps | grep -v grep | grep geometry | awk {print $1})