diff --git a/ptgdp b/ptgdp index f383071..ea30cab 100755 --- a/ptgdp +++ b/ptgdp @@ -276,12 +276,15 @@ playlist() { local -i dlcache=0 local -i dlsuccess=0 local -i dlerr=0 - local -i maxlines=0 + local -i goodlines=0 + local -i totallines=0 while read line; do + totallines+=1 validateline "$line" || continue - maxlines+=1 + goodlines+=1 done < "$1" - log "Parsed playlist \"$1\" with $maxlines songs" + log "Parsed playlist \"$1\" with $goodlines songs" + log "Playlist has $totallines total lines" 2 while read line; do if validateline "$line"; then queuesong "$line" || error "Failed to enqueue song: \"$line\""