mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-11 13:53:37 +00:00
manual.sh minor bug fix
Issues were occurring where manual.sh could not accept incorrect channel input. Now, if an invalid channel is input, you will simply be diverted to your first channel. This can be changed later in many ways, one of which is to simply kill the script; I did not choose this since going to channel 1 kind of serves as an "error report" since you didn't make it to the channel you requested.
This commit is contained in:
@@ -127,6 +127,16 @@ if [ "${#CHANNEL_DIR_ARR[@]}" -gt 1 ]; then
|
||||
NEXT_CHANNEL_DIR=${CHANNEL_DIR_SORTED[$i]}
|
||||
break
|
||||
fi
|
||||
|
||||
#echo "TESTING"
|
||||
#echo $i
|
||||
#echo ${#CHANNEL_DIR_NUMBERS[@]}
|
||||
if [ $i -eq $((${#CHANNEL_DIR_NUMBERS[@]} - 1)) ]; then
|
||||
echo "No NEXT CHANNEL MATCH found, reverting to first element"
|
||||
NEXT_CHANNEL_DIR=${CHANNEL_DIR_SORTED[0]}
|
||||
NEXT_CHANNEL=${CHANNEL_DIR_NUMBERS[0]}
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# This is our modified way of searching for the correct directory for the previous channel
|
||||
|
||||
Reference in New Issue
Block a user