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