30d pls
parent
8af32661eb
commit
f2d24c6e2a
|
|
@ -31,6 +31,18 @@ main() {
|
||||||
-X DELETE
|
-X DELETE
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
local too_old_unix="$(($(_date +%s) - 30 * 24 * 60 * 60))" # 30d ago
|
||||||
|
local too_old_ts="$(_date -d @$too_old_unix -u +%Y-%m-%d_%H-%M-%S)"
|
||||||
|
for recording in $(
|
||||||
|
api "/api/recording/query?recording-id=${too_old_ts}_x&limit=10000&reverse=false&include-data=false" \
|
||||||
|
| jq -r .[].id \
|
||||||
|
| sort
|
||||||
|
); do
|
||||||
|
echo "$recording is too old"
|
||||||
|
echo api "/api/recording/delete/$recording" \
|
||||||
|
-X DELETE
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
video_has_movement() {
|
video_has_movement() {
|
||||||
|
|
@ -52,7 +64,7 @@ video_has_movement() {
|
||||||
threshold="$max_of_last_n"
|
threshold="$max_of_last_n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
threshold="$(_perl -e "print $threshold + 0.005")"
|
threshold="$(_perl -e "print $threshold + 0.01")"
|
||||||
|
|
||||||
local has_change=false
|
local has_change=false
|
||||||
if [ "${#flattened_scores[@]}" -lt 10 ]; then
|
if [ "${#flattened_scores[@]}" -lt 10 ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue