YRadio internet radio player

Moderator: Forum moderators

Post Reply
User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

YRadio internet radio player

Post by fredx181 »

YRadio internet radio player for KLV-Airedale, xbps package;

yradio-1.2_0.noarch.xbps
YRadio internet radio player for KLV-Airedale, xbps package
(306.04 KiB) Downloaded 46 times

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)

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: YRadio internet radio player

Post 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).

yradio-1.4_0.noarch.xbps
YRadio xbps package
(305.45 KiB) Downloaded 63 times

P.S. the 64-bit appimage from here works too on KLV (yad (gtk2) and jq included): viewtopic.php?p=77569#p77569

User avatar
Sofiya
Posts: 2263
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1469 times
Been thanked: 1509 times

Re: YRadio internet radio player

Post by Sofiya »

I love this receiver!!!
I generally like the things @fredx181 does

KL
PUPPY LINUX Simple fast free

User avatar
amethyst
Posts: 2409
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 502 times

Re: YRadio internet radio player

Post by amethyst »

Will this work on 32-bit Puppys. A .pet package perhaps?

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: YRadio internet radio player

Post 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

User avatar
amethyst
Posts: 2409
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 502 times

Re: YRadio internet radio player

Post 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?

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: YRadio internet radio player

Post by fredx181 »

@amethyst replied here: viewtopic.php?p=77776#p77776

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: YRadio internet radio player

Post 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 :lol:

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 truefalse, 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.

Last edited by step on Sat Jan 07, 2023 9:26 pm, edited 1 time in total.
User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: YRadio internet radio player

Post 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 :lol:

Sometimes I double click my head .... won't work either :D

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

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: YRadio internet radio player

Post 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.

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: YRadio internet radio player

Post 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

yradio-1.5_0.noarch.xbps
YRadio v1.5
(306.85 KiB) Downloaded 38 times
User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: YRadio internet radio player

Post 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.

yradio-1.6_0.noarch.xbps
YRadio v1.6 xbps package
(307.68 KiB) Downloaded 56 times
nik120s
Posts: 3
Joined: Mon Aug 05, 2024 2:50 pm

Re: YRadio internet radio player

Post 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

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: YRadio internet radio player

Post 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.

nik120s
Posts: 3
Joined: Mon Aug 05, 2024 2:50 pm

Re: YRadio internet radio player

Post 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})

Post Reply

Return to “KL-Dev_Work”