1
0
Fork 0

Import fixes

This commit is contained in:
magnolia-fan 2011-06-24 13:59:35 +04:00
parent 89776db403
commit 96c3d925df
2 changed files with 4 additions and 3 deletions

View File

@ -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?

View File

@ -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();
} }
} }