Skip to content

Commit 941dc0b

Browse files
committed
fix(multi-load): fixed the loading pause stops when the last exact video is loaded.
- previously, an extra load was performed when searching for content.
1 parent ff8d332 commit 941dc0b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

yt-cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ open_video()
3636
get_youtube()
3737
{
3838
if [[ $1 -eq 0 ]]; then
39-
NUM_SELECTED=$(fzf --style full --header "Select the desired $3" --bind 'start,ctrl-r:reload:echo "󰌑 Return"; i=0; while true; do feed=$(yt-dlp -i -q --flat-playlist '"$BASE$2/$3"' --playlist-start $(($i*100+1)) --playlist-end $(($i*100+100)) --print "%(playlist_index)d: %(title)s"); i=$(($i+1)); [[ "$feed" == "" ]] && exit 0 || echo $feed; done' | awk -F: '{print $1}')
39+
NUM_SELECTED=$(fzf --style full --header "Select the desired $3" --bind 'start,ctrl-r:reload:echo "󰌑 Return"; i=0; while [[ "$i" != "-1" ]]; do feed=$(yt-dlp -i -q --flat-playlist '"$BASE$2/$3"' --playlist-start $(($i*100+1)) --playlist-end $(($i*100+100)) --print "%(playlist_index)d: %(title)s"); i=$(($i+1)); echo $feed; [[ "$(echo $feed | wc -l)" -lt "100" ]] && i=-1; done' | awk -F: '{print $1}')
4040
if [[ $NUM_SELECTED == "󰌑 Return" ]]; then
4141
echo "󰌑 Return"
4242
else

0 commit comments

Comments
 (0)