1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-03 05:02:40 +02:00

Fix changing dropbox folders (#1705)

This commit is contained in:
timstanley1985
2021-03-13 14:43:59 +00:00
committed by GitHub
parent 4a2af3a87e
commit fbb903d608
2 changed files with 5 additions and 13 deletions

View File

@@ -204,20 +204,12 @@ if [ -n "$F_cmd" ]; then
fi
if [ -n "${F_dropboxStillsDir+x}" ]; then
F_dropboxStillsDir=$(printf '%b' "${F_dropboxStillsDir//%/\\x}" | sed 's/\//\\\//g')
if [[ $F_dropboxStillsDir =~ ^/.* ]];then
rewrite_config /system/sdcard/config/motion.conf dropbox_stills_dir "\"$F_dropboxStillsDir\""
else
rewrite_config /system/sdcard/config/motion.conf dropbox_stills_dir "/\"$F_dropboxStillsDir\""
fi
rewrite_config /system/sdcard/config/motion.conf dropbox_stills_dir "\"$F_dropboxStillsDir\""
echo "dropbox snapshots directory set to $F_dropboxStillsDir<br/>"
fi
if [ -n "${F_dropboxVideosDir+x}" ]; then
F_dropboxVideosDir=$(printf '%b' "${F_dropboxVideosDir//%/\\x}" | sed 's/\//\\\//g')
if [[ $F_dropboxVideosDir =~ ^/.* ]];then
rewrite_config /system/sdcard/config/motion.conf dropbox_videos_dir "\"$F_dropboxVideosDir\""
else
rewrite_config /system/sdcard/config/motion.conf dropbox_videos_dir "/\"$F_dropboxVideosDir\""
fi
rewrite_config /system/sdcard/config/motion.conf dropbox_videos_dir "\"$F_dropboxVideosDir\""
echo "dropbox videos directory set to $F_dropboxVideosDir<br/>"
fi
if [ -n "${F_motionTriggerLed+x}" ]; then
@@ -273,7 +265,7 @@ if [ -n "$F_cmd" ]; then
if [ "$(rtsp_server status)" = "ON" ]; then
echo "Restarting rtsp server"
rtsp_server off
rtsp__server on
rtsp_server on
fi
;;
*)

View File

@@ -238,7 +238,7 @@
</select>
</div>
<div class="w3-half">
<label>Dropbox snapshots remote directory</label>
<label>Dropbox snapshots remote directory (must start with / )</label>
<input class="w3-input" id="dropboxStillsDir" type="text">
</div>
</div>
@@ -252,7 +252,7 @@
</select>
</div>
<div class="w3-half">
<label>Dropbox videos remote directory</label>
<label>Dropbox videos remote directory (must start with / )</label>
<input class="w3-input" id="dropboxVideosDir" type="text">
</div>
</div>