URI: 
       Change radio station strategy to keep a long playlist. - annna - Annna the nice friendly bot.
  HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
       ---
   DIR commit a4681fe075c710cdb1756cdd98115c0765a8686f
   DIR parent 621fb559fe1ac04768c4258e45798cd6b616e53d
  HTML Author: Annna Robert-Houdin <annna@bitreich.org>
       Date:   Sat,  3 Jan 2026 08:42:14 +0100
       
       Change radio station strategy to keep a long playlist.
       
       Diffstat:
         M annna-message-radio                 |       2 +-
         M modules/radio/radio-random-channel… |      19 ++++++++-----------
       
       2 files changed, 9 insertions(+), 12 deletions(-)
       ---
   DIR diff --git a/annna-message-radio b/annna-message-radio
       @@ -10,7 +10,7 @@ case "${IRC_PRIVMSG_TEXT}" in
        "${IRC_USER}, please toggle single"*) /usr/bin/mpc -q single; exit;;
        "${IRC_USER}, please toggle consume"*) /usr/bin/mpc -q consume; exit;;
        "${IRC_USER}, please rescan"*) /usr/bin/mpc -q rescan; exit;;
       -"${IRC_USER}, please change channel"*) /home/annna/bin/modules/radio/radio-random-channel-cronjob.she; exit;;
       +"${IRC_USER}, please change channel"*) /home/annna/bin/modules/radio/radio-random-channel-cronjob.sh; exit;;
        "${IRC_USER}, how many people listen to the radio"*)  annna-say "${IRC_CMD_USER}, $(/br/bin/bitreich-radio-listener-count)"; exit;;
        "${IRC_USER}, what is playing"*)
                currentsong="$(mpc current 2>/dev/null)"
   DIR diff --git a/modules/radio/radio-random-channel-cronjob.sh b/modules/radio/radio-random-channel-cronjob.sh
       @@ -5,19 +5,16 @@ randomuri="$(curl -s gophers://bitreich.org/1/radio/lawn/random \
                | cut -f 2 \
                | cut -d':' -f 2-)"
        
       -# Set modes for our logic to work.
       -mpc random off >/dev/null 2>&1
       +# Be sure mpc is playing.
       +mpc play >/dev/null 2>&1
       +# We randomly shuffle around in the playlist.
       +mpc random on >/dev/null 2>&1
       +# If the cronjob does not work, keep on repeating.
        mpc repeat on >/dev/null 2>&1
       +# Do not remove off the playlist.
        mpc consume off >/dev/null 2>&1
       -# Go into playing, so we can crop.
       -mpc play >/dev/null 2>&1
       -#mpc playlist
       -# Be sure there is only one thing in the playlist.
       -mpc crop >/dev/null 2>&1
       -#mpc playlist
       -# Add new randum radio at position 2.
       +# Add the new radio station.
        printf "%s\n" "${randomuri}" | mpc add >/dev/null 2>&1
       -#mpc playlist
       -# Fade to new radio.
       +# Go to the next random station.
        mpc next >/dev/null 2>&1