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
|
[[ ${menuCode} -ne 0 ]] && continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
sed -i -e "s/^tts=.*/tts=\"${tts}\"/" -e "s/^ttsRate=.*/ttsRate=\"${ttsRate}\"/" "${config}/config" &&
|
# Update or add TTS settings
|
||||||
if [[ "${tts}" == "true" ]]; then
|
if grep -q "^tts=" "${config}/config"; then
|
||||||
dialog --msgbox "TTS enabled at rate ${ttsRate}." -1 -1
|
sed -i "s/^tts=.*/tts=\"${tts}\"/" "${config}/config"
|
||||||
else
|
else
|
||||||
dialog --msgbox "TTS disabled." -1 -1
|
echo "tts=\"${tts}\"" >> "${config}/config"
|
||||||
fi
|
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")
|
||||||
userName="$(dialog --backtitle "Tojam" \
|
userName="$(dialog --backtitle "Tojam" \
|
||||||
|
Reference in New Issue
Block a user