fixed pick when video link is commented out

This commit is contained in:
Emma Tebibyte 2023-11-03 13:42:15 -06:00
parent cb4a71be79
commit 6ab0d98ded
Signed by: emma
GPG Key ID: 6D661C738815E7DD

7
yt
View File

@ -76,7 +76,12 @@ music() { # downloads a video, splitting by chapter and only saving the audio
pick() { # Pick a video to play from a list of videos pick() { # Pick a video to play from a list of videos
while test -n "$1"; do while test -n "$1"; do
for line in $(cat "$1"); do for line in $(cat "$1"); do
cache "$line" if test -n "$(printf '%s\n' "$line" | sed -n '/^\#/p')"
then
continue
else
cache "$line"
fi
if test -z "$list"; then if test -z "$list"; then
list="$(grep "$line" "$cachefile")" list="$(grep "$line" "$cachefile")"