Skip to content

Commit

Permalink
fix: if auto play don't download thumbnails if -t is given
Browse files Browse the repository at this point in the history
  • Loading branch information
pystardust committed Feb 24, 2021
1 parent adac538 commit 40c2047
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ytfzf
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ while getopts "hDmdfxHarltU:" opt; do
done
shift $((OPTIND-1))

# If in auto select mode don't download thumbnails
[ $auto_select -eq 1 ] || [ $random_select -eq 1 ] && { show_thumbnails=0; }

# Formatting and settings for menu's
if [ $is_ext_menu -eq 0 ]; then
dep_ck "fzf"
prompt_menu='fzf --bind change:first --tabstop=1 --layout=reverse --delimiter="$(printf "\t")" --nth=1,2'
Expand All @@ -271,6 +275,7 @@ else
fi

# MAIN
## Scrape data and store video information ( and thumbnails download)
[ $main -eq 0 ] && {

if [ "$*" = "-" ]; then
Expand Down Expand Up @@ -312,9 +317,8 @@ fi
sed 's/^"//;s/"$//;s/\\"//g' | sed -E -n ";N;N;N;N;N;s/\n/\t\|/g;p"
)"
[ -z "$videos_data" ] && { printf "No results found. Try different keywords.\n"; errinfo ; exit 1;}
[ $show_thumbnails -eq 1 ] && download_thumbnails


[ $show_thumbnails -eq 1 ] && download_thumbnails
} #MAIN END

## USER SELECTION
Expand Down

0 comments on commit 40c2047

Please sign in to comment.