From a059aa6bb7e8d274224cc73ece91d3c2c0ca4697 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 2 Dec 2017 20:47:28 -0500 Subject: [PATCH] Fixed a bug in the new sing module. --- modules/sing/sing.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/sing/sing.sh b/modules/sing/sing.sh index c4d6fb7..42eab71 100755 --- a/modules/sing/sing.sh +++ b/modules/sing/sing.sh @@ -4,8 +4,9 @@ shift chan="$1" shift #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=$(($RANDOM % $i + 1)) lyricText="$(echo "$lyricText" | tail +$i | head -1)" #Display the lyric text if [ ${#lyricText} -gt 15 ] ; then