add verbose check to more print statements

This commit is contained in:
ksyasuda 2021-11-01 15:26:03 -07:00
parent 63450b38ec
commit e42629d406

View File

@ -109,7 +109,7 @@ dep_ch() {
check_anime_name() { check_anime_name() {
# Maybe change to query the db for a similar name # Maybe change to query the db for a similar name
# Check to make sure passed in name is not empty # Check to make sure passed in name is not empty
printf "%s\n" "VAR: $1" [ "$VERBOSE" -eq 1 ] && printf "%s\n" "VAR: $1"
if [[ "$1" == "" ]] || [[ "$1" == " " ]] || [[ "$1" == "\n" ]]; then if [[ "$1" == "" ]] || [[ "$1" == " " ]] || [[ "$1" == "\n" ]]; then
printf "%s\n" "Passed in name is null" printf "%s\n" "Passed in name is null"
return 1 return 1
@ -328,7 +328,7 @@ episode_selection() {
fi fi
done done
printf "WATCH HISTORY: %s\n" "$watch_history" [ "$VERBOSE" -eq 1 ] && printf "WATCH HISTORY: %s\n" "$watch_history"
# cnt=$(printf "%s\n" "$cnt_stmt" | sqlite3 "$history_db" | tail -1) # cnt=$(printf "%s\n" "$cnt_stmt" | sqlite3 "$history_db" | tail -1)
# printf "NUM EPISODES: $last_ep_number" # printf "NUM EPISODES: $last_ep_number"
# get user choice and set the start and end # get user choice and set the start and end
@ -370,7 +370,7 @@ open_episode() {
printf "$c_reset" printf "$c_reset"
fi fi
printf "Getting data for episode %d\n" $episode [ "$VERBOSE" -eq 1 ] && printf "Getting data for episode %d\n" $episode
insert_history "$anime_id" "$episode" insert_history "$anime_id" "$episode"