Fixed a bug in the new sing module.
This commit is contained in:
parent
6a82388e5b
commit
a059aa6bb7
@ -4,8 +4,9 @@ shift
|
|||||||
chan="$1"
|
chan="$1"
|
||||||
shift
|
shift
|
||||||
#get the lyric text into a variable
|
#get the lyric text into a variable
|
||||||
lyricText="$(clyrics $@ | tr '[:space:]' ' ' | tr -s ' ' | fold -s -w 160)"
|
lyricText="$(clyrics $@ | tr '[:space:]' ' ' | tr -s ' ' | fold -s -w 256)"
|
||||||
i=$(echo "$lyricText" | wc -l)
|
i=$(echo "$lyricText" | wc -l)
|
||||||
|
i=$(($RANDOM % $i + 1))
|
||||||
lyricText="$(echo "$lyricText" | tail +$i | head -1)"
|
lyricText="$(echo "$lyricText" | tail +$i | head -1)"
|
||||||
#Display the lyric text
|
#Display the lyric text
|
||||||
if [ ${#lyricText} -gt 15 ] ; then
|
if [ ${#lyricText} -gt 15 ] ; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user