Meilleure gestion des webradios
This commit is contained in:
parent
af29cc2814
commit
d1a65ac6cb
1 changed files with 6 additions and 3 deletions
|
@ -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 l’affichage 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue