ptgdp: Add sanity check for MPD
This commit is contained in:
		
							
								
								
									
										6
									
								
								ptgdp
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								ptgdp
									
									
									
									
									
								
							| @@ -144,6 +144,12 @@ playlist() { | ||||
| 			log "Music can be found at \"$_musicdir\"" | ||||
| 		fi | ||||
| 	fi | ||||
| 	if [ -z "$_optdownloadonly" ] && ! mpc status > /dev/null 2>&1; then | ||||
| 		notify "Could not communicate with MPD" \ | ||||
| 			"MPD connection was refused. Ensure your configuration is correct and the daemon is currently running." \ | ||||
| 			normal dialog-error 3000 | ||||
| 		error "Failed to communicate with MPD" 52 | ||||
| 	fi | ||||
| 	local -i dlexist=0 | ||||
| 	local -i dlsuccess=0 | ||||
| 	local -i dlfailure=0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user