Commit 93f30dc
xxwhirlpool
·
2026-03-08 14:52:21 -0400 EDT
parent f85ddb7
vidhash confirm stuff
1 files changed,
+7,
-1
+7,
-1
| ... | ... | @@ -19,7 +19,13 @@ vidsubs() { | |
| 19 | 19 | vidhash() { | |
| 20 | 20 | # borrowed from my buddy neckspike: | |
| 21 | 21 | # https://pastebin.com/mg3CVDiU | |
| 22 | - | for f in *.mkv; do hash=$(crc32 "$f") ext="${f##*.}" newname="${f%.*} [$hash]".$ext && gum confirm "are you sure you want to rename?" && mv "$f" "$newname" || echo "printing names instead" && echo "$newname"; done | |
| 22 | + | for f in *.mkv; do | |
| 23 | + | hash=$(crc32 "$f") | |
| 24 | + | ext="${f##*.}" | |
| 25 | + | newname="${f%.*} [$hash]".$ext | |
| 26 | + | ||
| 27 | + | gum confirm "are you sure you want to rename?" --default=yes --timeout=3s && mv "$f" "$newname" && echo -e "new name:\n$newname"|| echo -e "printing names instead:\n$newname" | |
| 28 | + | done | |
| 23 | 29 | } | |
| 24 | 30 | ||
| 25 | 31 | choice() { |