mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Update search.js
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							725c8e5385
						
					
				
				
					commit
					4301c989f0
				
			| @@ -373,6 +373,7 @@ var Search = { | |||||||
|                                         not_added_song.querySelector(".extra-button-search").setAttribute("data-text", title + " - " + artist.join(" ")); |                                         not_added_song.querySelector(".extra-button-search").setAttribute("data-text", title + " - " + artist.join(" ")); | ||||||
|                                         document.querySelector(".not-imported-container").insertAdjacentHTML("beforeend", not_added_song.innerHTML); |                                         document.querySelector(".not-imported-container").insertAdjacentHTML("beforeend", not_added_song.innerHTML); | ||||||
|                                         Helper.removeClass(".not-imported", "hide"); |                                         Helper.removeClass(".not-imported", "hide"); | ||||||
|  |                                         continue; | ||||||
|                                     } |                                     } | ||||||
|                                     var duration = Search.durationToSeconds(data.contentDetails.duration); |                                     var duration = Search.durationToSeconds(data.contentDetails.duration); | ||||||
|                                     var not_matched = false; |                                     var not_matched = false; | ||||||
| @@ -637,6 +638,10 @@ addVideos: function(ids){ | |||||||
|             } |             } | ||||||
|             for(var i = 0; i < response.items.length; i++) { |             for(var i = 0; i < response.items.length; i++) { | ||||||
|                 var song = response.items[i]; |                 var song = response.items[i]; | ||||||
|  |                 if(song.contentDetails == undefined || song.contentDetails.duration == undefined) { | ||||||
|  |                     Helper.log(["Song without duration", song]); | ||||||
|  |                     continue; | ||||||
|  |                 } | ||||||
|                 var duration=Search.durationToSeconds(song.contentDetails.duration); |                 var duration=Search.durationToSeconds(song.contentDetails.duration); | ||||||
|                 if((longsongs != undefined && !longsongs) || duration<720){ |                 if((longsongs != undefined && !longsongs) || duration<720){ | ||||||
|                     enc_title= song.snippet.title;//encodeURIComponent(song.snippet.title); |                     enc_title= song.snippet.title;//encodeURIComponent(song.snippet.title); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user