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.pic_url = lastfm_artist['artist']['image'][3]['#text']
artist.listeners = lastfm_artist['artist']['stats']['listeners'] artist.listeners = lastfm_artist['artist']['stats']['listeners']
artist.artist_type = brainz_artist.type artist.artist_type = brainz_artist.type
artist.original_name = brainz_artist.name
artist.mbid = brainz_artist.id artist.mbid = brainz_artist.id
artist.save artist.save!
brainz_artist.urls.each do |service, url| brainz_artist.urls.each do |service, url|
ArtistLink.new( ArtistLink.new(

View File

@ -5,7 +5,9 @@
.span4.columns.pic .span4.columns.pic
= image_tag @artist.pic_url unless @artist.pic_url.nil? = image_tag @artist.pic_url unless @artist.pic_url.nil?
.span7.columns.desc .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? = @artist.desc.html_safe unless @artist.desc.nil?
- unless @artist.artist_links.empty? - unless @artist.artist_links.empty?
.service-icons .service-icons
@ -22,7 +24,9 @@
.button-container .button-container
%a.btn.add-album{ :'data-album-id' => album.id }= I18n.t 'player.add' %a.btn.add-album{ :'data-album-id' => album.id }= I18n.t 'player.add'
.span7.columns.tracks .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 %table.zebra-striped.tracklist
- album.tracks.each do |track| - album.tracks.each do |track|
%tr %tr