fix: file cleanup
This commit is contained in:
parent
9b8113fdff
commit
60d259b200
@ -153,13 +153,13 @@ decodeFile() {
|
|||||||
done
|
done
|
||||||
)
|
)
|
||||||
status 0
|
status 0
|
||||||
|
cleanup $tmpfile.wav
|
||||||
EOInsert
|
EOInsert
|
||||||
)
|
)
|
||||||
progressSpin
|
progressSpin
|
||||||
fi
|
fi
|
||||||
if (( sox_needed ))
|
if (( sox_needed ))
|
||||||
then
|
then
|
||||||
cleanup="$tempdir/$tmpfile"
|
|
||||||
decodeSox "$tempdir/$tmpfile.wav"
|
decodeSox "$tempdir/$tmpfile.wav"
|
||||||
if ! soxtaskid=$(
|
if ! soxtaskid=$(
|
||||||
Select tasks id <<<"key = $tmpfile"
|
Select tasks id <<<"key = $tmpfile"
|
||||||
@ -183,7 +183,7 @@ decodeFile() {
|
|||||||
)
|
)
|
||||||
requires $decodetaskid
|
requires $decodetaskid
|
||||||
status 0
|
status 0
|
||||||
cleanup $cleanup
|
cleanup $tmpfile.wav
|
||||||
EOInsert
|
EOInsert
|
||||||
)
|
)
|
||||||
progressSpin
|
progressSpin
|
||||||
|
|||||||
@ -65,7 +65,6 @@ encodeFile::mp3() {
|
|||||||
echo "cmd_arg$key $cleanedopts"
|
echo "cmd_arg$key $cleanedopts"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
cleanup $tempdir/$tmpfile.wav
|
|
||||||
source_file $fileid
|
source_file $fileid
|
||||||
status 0
|
status 0
|
||||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||||
|
|||||||
@ -33,7 +33,6 @@ encodeFile::opus() {
|
|||||||
echo "cmd_arg$key $cleanedopts"
|
echo "cmd_arg$key $cleanedopts"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
cleanup $tempdir/$tmpfile.wav
|
|
||||||
source_file $fileid
|
source_file $fileid
|
||||||
status 0
|
status 0
|
||||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||||
|
|||||||
@ -29,7 +29,6 @@ encodeFile::vorbis() {
|
|||||||
echo "cmd_arg$key ${oggencopts[key]}"
|
echo "cmd_arg$key ${oggencopts[key]}"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
cleanup $tempdir/$tmpfile.wav
|
|
||||||
source_file $fileid
|
source_file $fileid
|
||||||
status 0
|
status 0
|
||||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||||
|
|||||||
@ -60,9 +60,12 @@ cleaner() {
|
|||||||
count=$(Select tasks required_by <<<"id = $taskid")
|
count=$(Select tasks required_by <<<"id = $taskid")
|
||||||
if (( count == 0 ))
|
if (( count == 0 ))
|
||||||
then
|
then
|
||||||
rm -f "$cleanup"
|
[[ -n "$cleanup" ]] && rm -f "$tempdir/$cleanup"
|
||||||
fi
|
|
||||||
Delete tasks <<<"id = $taskid"
|
Delete tasks <<<"id = $taskid"
|
||||||
unset finishedtasks[key]
|
unset finishedtasks[key]
|
||||||
|
else
|
||||||
|
Update tasks status 4 \
|
||||||
|
<<<"id = $taskid"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user