From 38e4d2496f44d9d16c5fe1970a4b0ca190e720bb Mon Sep 17 00:00:00 2001 From: magnolia-fan Date: Wed, 15 Jun 2011 00:01:42 +0400 Subject: [PATCH] Import w/ desc and pics --- app/controllers/artist_controller.rb | 23 +++ app/models/album.rb | 2 + app/models/artist.rb | 1 + app/models/track.rb | 1 + config/routes.rb | 2 + db/development.sqlite3 | Bin 22528 -> 22528 bytes lib/tasks/db_import.rake | 13 +- public/BetaHaven.html | 2 +- public/javascripts/ajax.js | 1 - public/javascripts/layout.js | 2 +- public/jet.json | 236 --------------------------- public/stylesheets/layout.css | 2 + public/stylesheets/player.css | 1 + 13 files changed, 43 insertions(+), 243 deletions(-) delete mode 100644 public/jet.json diff --git a/app/controllers/artist_controller.rb b/app/controllers/artist_controller.rb index e86edf8..9230afa 100644 --- a/app/controllers/artist_controller.rb +++ b/app/controllers/artist_controller.rb @@ -1,2 +1,25 @@ class ArtistController < ApplicationController + def data + data = {} + artist = Artist.find_by_name(params[:name]) + data['artist'] = {name: artist.name, desc: artist.desc, pic: artist.pic_url} + data['albums'] = [] + albums = artist.albums + albums.each do |album| + tmp_album = {name: album.name, year: album.year, pic: album.pic_url} + album_tracks = [] + bonus_tracks = [] + album.tracks.each do |track| + tmp_track = {name: track.name, live: track.live, acoustic: track.acoustic} + time = (track.length / 1000).round + time_m = (time / 60).floor + time_s = time - time_m * 60 + tmp_track['duration'] = time_m.to_s + ':' + (time_s < 10 ? '0' : '') + time_s.to_s + (track.bonus == 0 ? album_tracks : bonus_tracks) << tmp_track + end + tmp_album['tracks'] = {album: album_tracks, bonus: bonus_tracks} + data['albums'] << tmp_album + end + render :json => data + end end diff --git a/app/models/album.rb b/app/models/album.rb index 46fa309..5633e5e 100644 --- a/app/models/album.rb +++ b/app/models/album.rb @@ -1,2 +1,4 @@ class Album < ActiveRecord::Base + belongs_to :artist + has_many :tracks, :order => 'bonus ASC, position ASC' end diff --git a/app/models/artist.rb b/app/models/artist.rb index de0d924..f8290cb 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -1,2 +1,3 @@ class Artist < ActiveRecord::Base + has_many :albums, :conditions => "status = 1", :order => 'year ASC, id ASC' end diff --git a/app/models/track.rb b/app/models/track.rb index 442fed3..c22fba8 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -1,2 +1,3 @@ class Track < ActiveRecord::Base + belongs_to :album end diff --git a/config/routes.rb b/config/routes.rb index fcf8fd8..e0c3bfa 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -55,4 +55,6 @@ Beathaven::Application.routes.draw do # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. # match ':controller(/:action(/:id(.:format)))' + + match 'artist(/:name)' => 'artist#data' end diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 42a9744ce9a324020e3666448a27f4621d838b54..e7f4f50fa61f076e9798d63999976c6acfe5399c 100644 GIT binary patch literal 22528 zcmeHPeT*B&b>HPKx%`kN*{LHdf|?Os+sB;5+azl1@4vPe-0UA}i-Ta*tde zxl8RXbvhTRGY(QT0o(=wob;a>O^_I>+oC~J6h>MNy+p8U$&Zq>j<1j+?Y-(HLTOXym>Rr>VE2ADv82{WqPd0I?3vjmw74`^o?Nn+6`%gAyHZYu57UT1~S(sWyGswUj)8kS~j zhVH+&YUn-7f1|D40BW}@DRrY~*;?IyuWqV}tu|H^JBb?b$<{h5(C>B0mu7}7s&=gy}X@kH!Ye!eBuk_6Ju&Ps$ zGRrw#eD(ip7pJfpcCGwjw?m2PS&ji(kuBZnKyP1fy5_OP%r{lV99SFlvSlmwu#HoD za%c9CTI3`9#>d$!PLr+cZI}mEEcJR%)$8h(ui+sjYyro}@I4GQQ{d5l*BKWl-a+Fc zg@ur?@5BU)Cp5jG-t6fb=wQXFx73cZ($SixLR^lu?FQFZ%JRb8h2>fBcr&w?!G#1= zPol~K^yF5m#FB2PrbV1u>N+dzn*c%XcDrQjv)d|%hPvg>#E0DL!1<=`f<6li&oaWR z!e0w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x%Ly4dSv55&p^Jjt^UHi~eZ&{tW89(t--~XybZ2>T4sdubctf%p?;5 zzhnduzUS^q|GZdeI^KZ2pb-a3|AW?HTcpc{okwCl7vgI`Qb(C-e@iSf8HByT1+=Ht zXoBLPy-0IGrkvOFWOf21_2S;Tf3CzFiX0ww!vggVv|DvIqKMw1md_Ghwkcyo_|hj1 z`I}=g=M`;;G9i4&aYv!y&7*=<7isRsgjzp2rwI{Zn>p#96CVILxOTm@&qy{rP2 zYdRuc`k68R%vhMTxEC(c4hn&O206A55#DBs{-#*e80`ayJVi+(ufsVZl9C}J+Ph%<7c9 :environment do @@ -5,21 +7,24 @@ namespace :db do ati.each do |name| # Get artist from MB mb_artist = MusicBrainzArtist.getByName(name) - # Save artist + # # Save artist + artist_xml = open('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&api_key=04fda005dbf61a50af5abc3e90f111f2&artist='+ URI.escape(name)).read artist = Artist.new artist.name = mb_artist.name - artist.desc = 'test import desc' - artist.pic_url = '/images/dummy.png' + artist.desc = artist_xml.scan(/<\!\[CDATA\[?(.*)\]\]><\/summary>/m)[0][0] + artist.pic_url = artist_xml.scan(/?(.*)<\/image>/)[0][0] artist.save # Get albums from MB mb_albums = MusicBrainzAlbum.where('artist_id = ? AND release_type = 1', mb_artist.id).order('year ASC, id ASC') mb_albums.each do |mb_album| # Saving album + album_xml = open('http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=04fda005dbf61a50af5abc3e90f111f2&artist='+ URI.escape(name) +'&album='+ URI.escape(mb_album.name)).read album = Album.new album.name = mb_album.name + album.year = mb_album.year album.artist_id = artist.id album.status = 1 - album.pic_url = '/images/dummy.png' + album.pic_url = album_xml.scan(/?(.*)<\/image>/)[0][0] album.save # Get album releases from MB mb_releases = MusicBrainzRelease.where('album_id = ? AND release_type = 1', mb_album.id).order('date ASC, id ASC') diff --git a/public/BetaHaven.html b/public/BetaHaven.html index 5ab5eec..66cc8c6 100644 --- a/public/BetaHaven.html +++ b/public/BetaHaven.html @@ -53,7 +53,7 @@ diff --git a/public/javascripts/ajax.js b/public/javascripts/ajax.js index 78e4fd9..5354e1f 100644 --- a/public/javascripts/ajax.js +++ b/public/javascripts/ajax.js @@ -2,7 +2,6 @@ $(function(){ $('a.data').live('click', function(){ var button = this; $.get(this.href, function(data){ - data = eval('('+ data +')'); if ($(button).hasClass('artist')) { Pages.renderArtist(data); } diff --git a/public/javascripts/layout.js b/public/javascripts/layout.js index dc296df..440975a 100644 --- a/public/javascripts/layout.js +++ b/public/javascripts/layout.js @@ -12,8 +12,8 @@ var beathaven = { }, adjustSizes: function() { $('#data-container').height($(window).height() - $('#header-container').height()); + $('#data-container').width($(window).width() - $('#player').width()) $('#player-container').height($(window).height()); $('#playlist').height($(window).height() - $('#player').height()); - } } \ No newline at end of file diff --git a/public/jet.json b/public/jet.json deleted file mode 100644 index 49c9084..0000000 --- a/public/jet.json +++ /dev/null @@ -1,236 +0,0 @@ -{ - 'artist': { - 'name': 'Jet', - 'desc': 'Jet is an Australian rock band formed in 2001 in Melbourne, Australia, consisting of lead guitarist Cameron Muncey, bassist Mark Wilson, and brothers Nic and Chris Cester on vocals/rhythm guitar and drums respectively. The group has sold 6.5 million records worldwide, with their debut album Get Born, released in 2003, accounting for about 3.5 million of that figure. The band\'s most recent album, Shaka Rock, was released on 19 August 2009.', - 'pic': 'pics/jet.jpg' - }, - 'albums': [ - { - 'name': 'Get Born', - 'year': 2003, - 'pic': '/images/getborn.jpg', - 'tracks': { - 'album': [ - { - 'name': 'Last Chance', - 'duration': '1:52', - }, - { - 'name': 'Are You Gonna Be My Girl', - 'duration': '3:34', - }, - { - 'name': 'Rollover DJ', - 'duration': '3:17', - }, - { - 'name': 'Look What You\'ve Done', - 'duration': '3:51', - }, - { - 'name': 'Get What You Need', - 'duration': '4:08', - }, - { - 'name': 'Move On', - 'duration': '4:21', - }, - { - 'name': 'Radio Song', - 'duration': '4:32', - }, - { - 'name': 'Get Me Outta Here', - 'duration': '2:56', - }, - { - 'name': 'Cold Hard Bitch', - 'duration': '4:03', - }, - { - 'name': 'Come Around Again', - 'duration': '4:30', - }, - { - 'name': 'Take It or Leave It', - 'duration': '2:23', - }, - { - 'name': 'Lazy Gun', - 'duration': '4:42', - }, - { - 'name': 'Timothy', - 'duration': '4:30', - }, - { - 'name': 'Sgt. Major', - 'duration': '4:05', - }, - { - 'name': 'Are You Gonna Be My Girl (Acoustic)', - 'duration': '3:50', - }, - { - 'name': 'Bruises (Demo)', - 'duration': '2:37', - }, - { - 'name': 'Hey Kids (Non-Album Track)', - 'duration': '3:00', - }, - { - 'name': 'Move On (Live)', - 'duration': '4:05', - }, - { - 'name': 'Cold Hard Bitch (Live)', - 'duration': '5:01', - }, - { - 'name': 'You Don\'t Look The Same (Demo)', - 'duration': '4:40', - }, - { - 'name': 'Look What You\'ve Done (Live)', - 'duration': '4:07', - } - ] - } - }, - { - 'name': 'Shine On', - 'year': 2006, - 'pic': '/images/shineon.jpg', - 'tracks': { - 'album': [ - { - 'name': 'Espirit d\'Escalier', - 'duration': '0:23', - }, - { - 'name': 'Holiday', - 'duration': '3:26', - }, - { - 'name': 'Put Your Money Where Your Mouth Is', - 'duration': '2:33', - }, - { - 'name': 'Bring It on Back', - 'duration': '4:09', - }, - { - 'name': 'That\'s All Lies', - 'duration': '2:44', - }, - { - 'name': 'Hey Kids', - 'duration': '3:13', - }, - { - 'name': 'Kings Horses', - 'duration': '3:20', - }, - { - 'name': 'Shine On', - 'duration': '4:37', - }, - { - 'name': 'Come On Come On', - 'duration': '4:24', - }, - { - 'name': 'Stand Up', - 'duration': '4:33', - }, - { - 'name': 'Rip It Up', - 'duration': '3:20', - }, - { - 'name': 'Skin and Bones', - 'duration': '3:17', - }, - { - 'name': 'Shiny Magazine', - 'duration': '3:28', - }, - { - 'name': 'Eleanor', - 'duration': '3:34', - }, - { - 'name': 'All You Have to Do', - 'duration': '4:39', - }, - { - 'name': 'Snap Your Fingers (Barbados Demo)', - 'duration': '1:29', - }, - { - 'name': 'This Night is Yours', - 'duration': '1:57', - } - ] - } - }, - { - 'name': 'Shaka Rock', - 'year': 2009, - 'pic': '/images/shakarock.jpg', - 'tracks': { - 'album': [ - { - 'name': 'K.I.A. (Killed In Action)', - 'duration': '3:29', - }, - { - 'name': 'Beat On Repeat', - 'duration': '2:30', - }, - { - 'name': 'She\'s A Genius', - 'duration': '2:59', - }, - { - 'name': 'Black Hearts (On Fire)', - 'duration': '3:14', - }, - { - 'name': 'Seventeen', - 'duration': '3:41', - }, - { - 'name': 'La Di Da', - 'duration': '2:53', - }, - { - 'name': 'Goodbye Hollywood', - 'duration': '4:13', - }, - { - 'name': 'Walk', - 'duration': '3:07', - }, - { - 'name': 'Times Like This', - 'duration': '3:20', - }, - { - 'name': 'Let Me Out', - 'duration': '3:12', - }, - { - 'name': 'Start the Show', - 'duration': '3:59', - }, - { - 'name': 'She Holds a Grudge', - 'duration': '4:18', - } - ] - } - } - ] -} \ No newline at end of file diff --git a/public/stylesheets/layout.css b/public/stylesheets/layout.css index c650758..e3088bd 100644 --- a/public/stylesheets/layout.css +++ b/public/stylesheets/layout.css @@ -21,6 +21,7 @@ body { #data-container { width: auto; margin-right: 350px; + overflow-y: scroll; } #player { @@ -29,4 +30,5 @@ body { } #playlist { width: 100%; + overflow-y: scroll; } \ No newline at end of file diff --git a/public/stylesheets/player.css b/public/stylesheets/player.css index b461029..06bf1f7 100644 --- a/public/stylesheets/player.css +++ b/public/stylesheets/player.css @@ -49,6 +49,7 @@ } .playlist-tracks li .item { padding: 5px 6px; + overflow: hidden; } .playlist-tracks li .item:hover { background-color: #D0E0F0;