From dce42c7e808a9be879c0515aaca3c4370b8fefcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 4 Mar 2026 17:59:27 +0100 Subject: [PATCH] mp3player-write: do not check disk space --- packages/mp3player-write.nix | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/packages/mp3player-write.nix b/packages/mp3player-write.nix index 65995ff..b1dfcad 100644 --- a/packages/mp3player-write.nix +++ b/packages/mp3player-write.nix @@ -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")