Fixed bug where tts and rate were not saving to the config file.
This commit is contained in:
22
tojam
22
tojam
@ -252,12 +252,22 @@ configure_ninjam() {
|
||||
[[ ${menuCode} -ne 0 ]] && continue
|
||||
fi
|
||||
fi
|
||||
sed -i -e "s/^tts=.*/tts=\"${tts}\"/" -e "s/^ttsRate=.*/ttsRate=\"${ttsRate}\"/" "${config}/config" &&
|
||||
if [[ "${tts}" == "true" ]]; then
|
||||
dialog --msgbox "TTS enabled at rate ${ttsRate}." -1 -1
|
||||
else
|
||||
dialog --msgbox "TTS disabled." -1 -1
|
||||
fi
|
||||
# Update or add TTS settings
|
||||
if grep -q "^tts=" "${config}/config"; then
|
||||
sed -i "s/^tts=.*/tts=\"${tts}\"/" "${config}/config"
|
||||
else
|
||||
echo "tts=\"${tts}\"" >> "${config}/config"
|
||||
fi
|
||||
if grep -q "^ttsRate=" "${config}/config"; then
|
||||
sed -i "s/^ttsRate=.*/ttsRate=\"${ttsRate}\"/" "${config}/config"
|
||||
else
|
||||
echo "ttsRate=\"${ttsRate}\"" >> "${config}/config"
|
||||
fi
|
||||
if [[ "${tts}" == "true" ]]; then
|
||||
dialog --msgbox "TTS enabled at rate ${ttsRate}." -1 -1
|
||||
else
|
||||
dialog --msgbox "TTS disabled." -1 -1
|
||||
fi
|
||||
;;
|
||||
"username")
|
||||
userName="$(dialog --backtitle "Tojam" \
|
||||
|
Reference in New Issue
Block a user