mirror of
				https://github.com/SuperBFG7/ympd
				synced 2025-10-30 21:33:00 +00:00 
			
		
		
		
	Central beautify Duration function
This commit is contained in:
		| @@ -218,15 +218,7 @@ function webSocketConnect() { | |||||||
|                         $('#panel-heading-queue').text(obj.totalSongs+' Songs'); |                         $('#panel-heading-queue').text(obj.totalSongs+' Songs'); | ||||||
|                     } |                     } | ||||||
|                     if (typeof(obj.totalTime) != undefined && obj.totalTime > 0 ) { |                     if (typeof(obj.totalTime) != undefined && obj.totalTime > 0 ) { | ||||||
|                         var days = Math.floor(obj.totalTime / 86400); |                         $('#panel-heading-queue').append(' – ' + beautifyDuration(obj.totalTime)); | ||||||
|                         var hours = Math.floor(obj.totalTime / 3600) - days * 24; |  | ||||||
|                         var minutes = Math.floor(obj.totalTime / 60) - hours * 60 - days * 1440; |  | ||||||
|                         var seconds = obj.totalTime - days * 86400 - hours * 3600 - minutes * 60; |  | ||||||
|                          |  | ||||||
|                         $('#panel-heading-queue').append(' – ' + |  | ||||||
|                             (days > 0 ? days + '\u2009d ' : '') + |  | ||||||
|                             (hours > 0 ? hours + '\u2009h ' + (minutes < 10 ? '0' : '') : '') + |  | ||||||
|                             minutes + '\u2009m ' + (seconds < 10 ? '0' : '') + seconds + '\u2009s'); |  | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|                     $('#queueList > tbody').empty(); |                     $('#queueList > tbody').empty(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jcorporation
					jcorporation