Skip to content

Commit 467e4cd

Browse files
committed
fix(multi-load): if there is no content, it only has the return item
1 parent 653b020 commit 467e4cd

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 [[ \"\$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}')
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)); [[ \"\$feed\" != \"\" ]] && 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)