add resume function to command-line download mode

This commit is contained in:
ksyasuda 2022-03-03 23:42:48 -08:00
parent 5c7093daf0
commit 3c4189e3ac

View File

@ -292,7 +292,11 @@ check_flags() {
if [ ! -d "$dl_dir" ]; then
mkdir -p "$dl_dir" || seppuku "Error creating directory: $dl_dir"
fi
run "-cd $dl_dir" "$@"
if ((IS_RESUME == 1)); then
run "-crd" "$dl_dir" "$@"
else
run "-cd $dl_dir" "$@"
fi
exit $?
elif ((IS_ROFI == 1 && IS_PLAY_FROM_FILE == 1 && IS_CUSTOM_THEME == 1)); then
run "-f$play_path" -T "$CFG_FILE" "$@"