pv-test, fix committing final file, fix checking for finished versions, add welcome message.

This commit is contained in:
me
2026-09-14 17:00:19 -07:00
parent 701dfbcc96
commit 3ac932e42b
+7 -5
View File
@@ -773,6 +773,8 @@ alias pa="v2a"
# Run all the different codecs, wrappers, bitrates, etc on a file.
function pv-test {
echo -e "Welcome! Let's get your tests set up...\n"
## Input ##
filename_in="$1"
@@ -1003,11 +1005,11 @@ function pv-test {
echo -e " * Parameters for this test: $newfile * \n"
if [[ -e "$newfile" ]]; then
echo "Unfinished version of this file already exists, removing."
rm -v "$newfile" ~/TRASH/
mv -v "$newfile" ~/TRASH/
echo -e "Removed unfinished version of this file.\n"
fi
if [[ -e *"$newfile" ]]; then
echo "Completed version of this file already exists, skipping."
if [[ `ls *"$newfile" 2>/dev/null` ]]; then
echo -e "Completed version of this file already exists, skipping.\n"
continue
fi
@@ -1037,7 +1039,7 @@ function pv-test {
printf -v padded_mins "%03d" "$minutes"
printf -v padded_secs "%02d" "$seconds"
if [[ "$status" == 0 ]]; then
if [[ "$status" == 0 && -s "$newfile" ]]; then
mv -v "$newfile" "$(basename "${filename_in}_${padded_mins}m${padded_secs}s${newfile}")"
else
echo "ERROR: ffmpeg exited with status $status, not renaming file."