Import fixes
This commit is contained in:
		
							parent
							
								
									89776db403
								
							
						
					
					
						commit
						96c3d925df
					
				| @ -54,7 +54,7 @@ class ImportController < ApplicationController | ||||
|           end | ||||
|         end | ||||
|        | ||||
|         unless releases_mb.empty? or true | ||||
|         unless releases_mb.empty? | ||||
|          | ||||
|           # Sorting releases by date | ||||
|           releases_mb.sort! { |a, b| a['date'].to_date <=> b['date'].to_date } | ||||
| @ -128,7 +128,7 @@ class ImportController < ApplicationController | ||||
|             tracks_mb.each do |mb_track| | ||||
|               unless ['[silence]', '[untitled]'].include? mb_track['recording']['title'] | ||||
|                 track = Track.new | ||||
|                 track.name = mb_track['recording']['title'] | ||||
|                 track.name = mb_track['recording']['title'].gsub(/\s\\\s\[.*?\]/, '') | ||||
|                 track.album_id = album.id | ||||
|                 track.position = mb_track['position'] | ||||
|                 track.length = mb_track['length'] unless mb_track['length'].nil? | ||||
|  | ||||
| @ -6,7 +6,7 @@ var Search = { | ||||
| 		$('#search-container input').attr('disabled', 'disabled').blur(); | ||||
| 		$('#search-container img').show(); | ||||
| 		$('.autocomplete-container').hide(); | ||||
| 		$('.artist_loading').hide(); | ||||
| 		$('.artist_loading.failed').hide(); | ||||
| 		Search.hideSuggestions(); | ||||
| 	}, | ||||
| 	 | ||||
| @ -48,6 +48,7 @@ var Search = { | ||||
| 	}, | ||||
| 	 | ||||
| 	showError: function() { | ||||
| 		$('.artist_loading.ok, .artist_pics').hide(); | ||||
| 		$('.artist_loading.failed').show(); | ||||
| 	} | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user