Add total line statistics for debugging

This commit is contained in:
Salt 2019-09-27 16:26:44 -05:00
parent d9c7102d8b
commit 1b32a72a0a

9
ptgdp
View File

@ -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\""