mirror of
				https://github.com/SuperBFG7/ympd
				synced 2025-10-31 05:43:01 +00:00 
			
		
		
		
	Add cover for http stream
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								htdocs/assets/httpstream.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								htdocs/assets/httpstream.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 10 KiB | 
| @@ -518,8 +518,6 @@ function webSocketConnect() { | |||||||
|                     } |                     } | ||||||
|                     break; |                     break; | ||||||
|               case "song_change": |               case "song_change": | ||||||
|  |  | ||||||
|                      |  | ||||||
|                     songChange(obj.data.title, obj.data.artist, obj.data.album, obj.data.uri); |                     songChange(obj.data.title, obj.data.artist, obj.data.album, obj.data.uri); | ||||||
|                     break; |                     break; | ||||||
|                 case 'mpdhost': |                 case 'mpdhost': | ||||||
| @@ -829,7 +827,12 @@ function songChange(title, artist, album, uri) { | |||||||
|     var pageTitle = 'myMPD: '; |     var pageTitle = 'myMPD: '; | ||||||
|  |  | ||||||
|     if (typeof uri != 'undefined' && uri.length > 0) { |     if (typeof uri != 'undefined' && uri.length > 0) { | ||||||
|         var coverImg='/library/'+uri.replace(/\/[^\/]+$/,'\/folder.jpg'); |         var coverImg=''; | ||||||
|  |         if (uri.indexOf('http://') == 0) { | ||||||
|  |             coverImg='/assets/httpstream.png'; | ||||||
|  |         } else { | ||||||
|  |             coverImg='/library/'+uri.replace(/\/[^\/]+$/,'\/folder.jpg'); | ||||||
|  |         } | ||||||
|         $('#album-cover').css('backgroundImage','url("'+coverImg+'")'); |         $('#album-cover').css('backgroundImage','url("'+coverImg+'")'); | ||||||
|     } |     } | ||||||
|     if(typeof artist != 'undefined' && artist.length > 0 && artist != '-') { |     if(typeof artist != 'undefined' && artist.length > 0 && artist != '-') { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jcorporation
					jcorporation