remove token

This commit is contained in:
ash
2026-05-31 20:33:44 +01:00
parent b390872d27
commit 9a096970c3
+7 -7
View File
@@ -3,7 +3,7 @@
# ==========================================
# CONFIGURATION (Edit these!)
# ==========================================
GOTIFY_TOKEN="AH5NXt3g0lSCyfT" # <--- Paste your token here
GOTIFY_TOKEN= # <--- Paste your token here
GOTIFY_URL="https://gotify.marlow.quest"
SRC_DIR="$HOME/Videos/Compress"
OUT_DIR="$SRC_DIR/Complete"
@@ -80,20 +80,20 @@ for f in "${files[@]}"; do
# Spinner & Handbrake
gum spin --spinner minidot --spinner.foreground 208 --title "Encoding: $filename ($old_mb MB)..." -- \
bash -c 'HandBrakeCLI -i "$IN_FILE" -o "$OUT_FILE" -e svt_av1 --encoder-preset 8 -q "$QUALITY" --vfr -l 1080 -E opus -B 128 > /dev/null 2>&1'
if [ $? -eq 0 ] && [ -f "$OUT_FILE" ]; then
new_size=$(wc -c < "$OUT_FILE")
new_mb=$(awk "BEGIN {printf \"%.1f\", $new_size/1048576}")
saved_mb=$(awk "BEGIN {printf \"%.1f\", $old_mb - $new_mb}")
gum style --foreground 76 "$filename"
gum style --foreground 245 " ↳ Size: ${old_mb}MB → ${new_mb}MB (Saved: ${saved_mb}MB)"
TOTAL_OLD_BYTES=$((TOTAL_OLD_BYTES + old_size))
TOTAL_NEW_BYTES=$((TOTAL_NEW_BYTES + new_size))
((FILE_COUNT++))
else
gum style --foreground 196 "✗ Failed: $filename"
gum style --foreground 196 "✗ Failed: $filename"
fi
echo ""
done
@@ -110,11 +110,11 @@ gum style \
if [ "$GOTIFY_ENABLED" = true ] && [ $FILE_COUNT -gt 0 ]; then
MESSAGE="Finished processing $FILE_COUNT videos. Total space saved: $TOTAL_SAVED_MB MB."
curl -s -S "$GOTIFY_URL/message?token=$GOTIFY_TOKEN" \
-F "title=✅ Video Encoding Complete" \
-F "message=$MESSAGE" \
-F "priority=5" > /dev/null
gum style --foreground 240 " (Gotify notification sent)"
fi