fixed scrolling text breaking when title contained slashes

Former-commit-id: e79fc9f18f
Former-commit-id: 338c7443d2f7e883461e21d42287b442ac076434
Former-commit-id: 4b1a7b79b0f155a6cc7056a8bbe1117fbb4c0078
This commit is contained in:
elena 2017-09-12 17:06:43 +03:00
parent 5aebcdc293
commit 387af5d4ab

View file

@ -18,11 +18,12 @@
# (where 12 is the offset (zero-based) and 5 is the length)
# Limit for scrolling text
LIMIT=26
LIMIT=30
#SEPERATOR=" --- "
#SEPERATOR=" -- "
#SEPERATOR=" ~~~ "
SEPERATOR=" ~~ "
#SEPERATOR="  "
#SEPERATOR=" <> "
SEPERATOR_LENGTH="$(echo ${#SEPERATOR})"
@ -100,8 +101,10 @@ do
else
LOOPTAIL="$(echo $INPUT | cut -c -$LIMIT)"
FULLSTRING="$(echo $INPUT | sed "s/$/$SEPERATOR/" | sed "s/$/$LOOPTAIL/" )"
FULLSTRING="$(echo "$INPUT$SEPERATOR$LOOPTAIL")"
#FULLSTRING="$(echo $INPUT | sed "s/$/$SEPERATOR/" | sed "s/$/$LOOPTAIL/" )"
# This is to prevent the bug when song changes and current i is larger than current song length
# (Not needed anymore, this bug was fixed differently)
# if [ $i -gt "${#FULLSTRING}" ]; then