1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

mp3player-write: do not check disk space

This commit is contained in:
2026-03-04 17:59:27 +01:00
parent 5bedd897c9
commit dce42c7e80

View File

@@ -35,26 +35,6 @@ writers.writeBashBin "mp3player-write" ''
exit 1
fi
TOTAL_SIZE=0
for f in "''${FILES[@]}"; do
if [ ! -f "$f" ]; then
echo "Warning: File '$f' does not exist, skipping."
continue
fi
FILE_SIZE=$(${lib.getExe' coreutils "stat"} --printf="%s" "$f")
TOTAL_SIZE=$((TOTAL_SIZE + FILE_SIZE / 2))
done
AVAILABLE=$(${lib.getExe' coreutils "df"} --output=avail "$MOUNT_POINT" | ${lib.getExe' coreutils "tail"} -n 1)
AVAILABLE=$((AVAILABLE * 1024))
if [ "$TOTAL_SIZE" -gt "$AVAILABLE" ]; then
echo "Error: Not enough space. Required: $TOTAL_SIZE bytes, Available: $AVAILABLE bytes"
exit 1
fi
echo "Enough space available. Starting conversion..."
sanitize_filename() {
local name
name=$(${lib.getExe' coreutils "basename"} "$1")