1
0
Fork 0

Original name

This commit is contained in:
magnolia-fan 2011-11-24 02:41:05 +04:00
parent 270d80ee0e
commit 63a567f7ce
2 changed files with 8 additions and 3 deletions

View File

@ -38,8 +38,9 @@ class ImportController < ApplicationController
artist.pic_url = lastfm_artist['artist']['image'][3]['#text']
artist.listeners = lastfm_artist['artist']['stats']['listeners']
artist.artist_type = brainz_artist.type
artist.original_name = brainz_artist.name
artist.mbid = brainz_artist.id
artist.save
artist.save!
brainz_artist.urls.each do |service, url|
ArtistLink.new(

View File

@ -5,7 +5,9 @@
.span4.columns.pic
= image_tag @artist.pic_url unless @artist.pic_url.nil?
.span7.columns.desc
%h2= @artist.name
%h2
=(@artist.original_name.nil? or @artist.original_name == @artist.name ? @artist.name : @artist.original_name)
%small= " "+(@artist.original_name.nil? or @artist.original_name == @artist.name ? "" : @artist.name)
= @artist.desc.html_safe unless @artist.desc.nil?
- unless @artist.artist_links.empty?
.service-icons
@ -22,7 +24,9 @@
.button-container
%a.btn.add-album{ :'data-album-id' => album.id }= I18n.t 'player.add'
.span7.columns.tracks
%h3{ :'data-album-id' => album.id }= album.name + " (" + album.year.to_s + ")"
%h3{ :'data-album-id' => album.id }
= album.name
%small= " ("+album.year.to_s+")"
%table.zebra-striped.tracklist
- album.tracks.each do |track|
%tr