Album status
This commit is contained in:
@@ -81,7 +81,7 @@ class ArtistController < ApplicationController
|
||||
|
||||
@artist[:albums] = []
|
||||
artist.albums.each do |album|
|
||||
if @@default_album_types.include? album.album_type
|
||||
if @@default_album_types.include? album.album_type and album.status == 1
|
||||
tmp_album = {id: album.id, name: album.name, year: album.year, pic: album.pic_url}
|
||||
album_tracks = []
|
||||
bonus_tracks = []
|
||||
|
||||
@@ -48,6 +48,7 @@ class ImportController < ApplicationController
|
||||
album.album_type = brainz_release_group.type
|
||||
album.pic_url = album_image
|
||||
album.has_pic = (album_image != '' and not album_image.nil?)
|
||||
album.status = 0
|
||||
dry_run ? ap(album) : album.save
|
||||
# Tracks from the first release
|
||||
tracks_hashed = []
|
||||
@@ -72,6 +73,8 @@ class ImportController < ApplicationController
|
||||
dry_run ? ap(track) : track.save
|
||||
end
|
||||
end
|
||||
album.status = 1
|
||||
album.save unless dry_run
|
||||
end
|
||||
|
||||
artist.status = 1
|
||||
|
||||
Reference in New Issue
Block a user