Add total line statistics for debugging
This commit is contained in:
		
							
								
								
									
										9
									
								
								ptgdp
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								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\""
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user