Skip to content

Commit 1244f40

Browse files
committed
feat(playlists): when accessing an item in a playlist, returning takes you back to the playlist.
1 parent 92e59dd commit 1244f40

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

yt-cli.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ subscribed_menu()
6161
while [[ "$URL_PLAYLIST" != "󰌑 Return" ]]; do
6262
URL_PLAYLIST=$(shift; get_youtube 0 $SUBSCRIBED_CHANNEL_SELECTED $TYPE_MEDIA_SEARCH_SELECTED)
6363
if [[ "$URL_PLAYLIST" != "󰌑 Return" ]]; then
64-
local URL=$(get_youtube 1 "$URL_PLAYLIST")
65-
if [[ "$URL" != "󰌑 Return" ]]; then
66-
shift; open_video $URL
67-
fi
64+
local URL=-1
65+
while [[ "$URL" != "󰌑 Return" ]]; do
66+
URL=$(get_youtube 1 "$URL_PLAYLIST")
67+
if [[ "$URL" != "󰌑 Return" ]]; then
68+
shift; open_video $URL
69+
fi
70+
done
6871
fi
6972
done
7073
elif [[ $TYPE_MEDIA_SEARCH_SELECTED != "Return" ]]; then

0 commit comments

Comments
 (0)