Meilleure gestion des webradios

This commit is contained in:
Breizh 2022-08-13 02:28:54 +02:00
parent 17e09f4fd7
commit 9e79da4fad
1 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,8 @@ sed '/^OK/q' <&"$OUT" &>/dev/null
# Initialisation des valeurs par défaut et des fonctions
declare -i SCROLL=50 I=0
declare -- artist song oldfile
declare -- artist song
declare -A old
human_time() {
local seconds="${1}"
@ -107,7 +108,7 @@ do
# En cas de changement de morceau,
# on réinitialise laffichage défilant
if [[ "${o["file"]}" != "$oldfile" ]]
if [[ "${o["file"]}" != "${old["file"]}" || "${o["Title"]}" != "${old["Title"]}" || "${o["Name"]}" != "${old["Name"]}" ]]
then
unset bloc1 bloc2 bloc3 bloc4
artist="${o["Artist"]:-${o["Name"]}}"
@ -126,7 +127,9 @@ do
bloc1="$artist"
bloc2="$song"
oldfile="${o["file"]}"
old["file"]="${o["file"]}"
old["Title"]="${o["Title"]}"
old["Name"]="${o["Name"]}"
I=0
fi