diff --git a/app/assets/javascripts/backbone/models/player.js.coffee b/app/assets/javascripts/backbone/models/player.js.coffee
index fed655d..23db47f 100644
--- a/app/assets/javascripts/backbone/models/player.js.coffee
+++ b/app/assets/javascripts/backbone/models/player.js.coffee
@@ -72,4 +72,3 @@ class BeatHaven.Models.Player extends Backbone.Model
return false if @move_it_mousedown
percent = obj.position / obj.duration * 100
$(".player .progress-bar .bar").css(width: "#{percent}%")
-
diff --git a/app/assets/javascripts/backbone/templates/album/show.mustache b/app/assets/javascripts/backbone/templates/album/show.mustache
index 92e4801..4d12815 100644
--- a/app/assets/javascripts/backbone/templates/album/show.mustache
+++ b/app/assets/javascripts/backbone/templates/album/show.mustache
@@ -3,8 +3,12 @@
{{#album_tracks}}
diff --git a/app/models/album.rb b/app/models/album.rb
index c95f71e..70254ee 100644
--- a/app/models/album.rb
+++ b/app/models/album.rb
@@ -33,6 +33,10 @@ class Album < ActiveRecord::Base
end
end
+ def url
+ "/album/#{id}"
+ end
+
def dump_json
Jbuilder.encode do |j|
j.album_title title
@@ -42,8 +46,13 @@ class Album < ActiveRecord::Base
j.track_id track.id
j.track_title track.title
j.track_duration track.duration
+ j.track_artists track.artists do |j, artist|
+ j.artist_title artist.name
+ j.artist_url artist.url
+ end
j.track_disc track.disc_id
j.track_position track.position
+ j.track_length track.length
j.meta do |j|
j.id track.id
j.title track.title
diff --git a/app/models/artist.rb b/app/models/artist.rb
index fabe47d..e9dda5d 100644
--- a/app/models/artist.rb
+++ b/app/models/artist.rb
@@ -10,12 +10,17 @@ class Artist < ActiveRecord::Base
pic? && bio?
end
+ def url
+ "/artist/#{name.gsub(/\s/, "+")}"
+ end
+
def dump_json
Jbuilder.encode do |j|
j.artist_title name
j.artist_pic pic
j.artist_bio bio
j.artist_loaded loaded?
+ j.artist_url url
j.artist_albums albums.shown.to_a do |j, album|
j.album_title album.title
j.album_year album.year