Skip to content

Commit

Permalink
Merge branch 'main' of github.com:koush/scrypted
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Aug 6, 2024
2 parents c08ce31 + 470c28d commit 2f4608e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion install/local/install-scrypted-proxmox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [ -n "$SCRYPTED_RESTORE" ]
then
RESTORE_VMID=$VMID
VMID=10444
pct destroy $VMID 2> > /dev/null
pct destroy $VMID 2>&1 > /dev/null
fi

echo "Downloading scrypted container backup."
Expand Down
6 changes: 3 additions & 3 deletions plugins/homekit/src/video-clips-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StorageSettings } from "@scrypted/sdk/storage-settings";
import checkDiskSpace from 'check-disk-space';
import { getSavePath, getVideoClip, getVideoClips, getVideoClipThumbnail, nukeClips, parseHksvId, pruneClips, removeVideoClip } from "./types/camera/camera-recording-files";

const DAYS_TO_KEEP = 10;
const DAYS_TO_KEEP = 3;
const PRUNE_AGE = DAYS_TO_KEEP * 24 * 60 * 60 * 1000;
const { systemManager } = sdk;

Expand Down Expand Up @@ -74,9 +74,9 @@ export class VideoClipsMixinProvider extends ScryptedDeviceBase implements Setti
const diskSpace = await checkDiskSpace(savePath);
let pruneAge = PRUNE_AGE;
if (diskSpace.free < 10_000_000_000) {
pruneAge = 1 * 24 * 60 * 60 * 1000;
pruneAge = 1 * 60 * 60 * 1000;
this.console.warn(`Low Disk space: ${savePath}`);
this.console.warn("Pruning videos older than 1 day to recover space.");
this.console.warn("Pruning videos older than 1 hour to recover space.");
}

pruneClips(pruneAge, this.console);
Expand Down

0 comments on commit 2f4608e

Please sign in to comment.