Tracks import

This commit is contained in:
Gregory Eremin
2012-09-01 21:55:01 +04:00
parent b5f616a9d9
commit 43422624f1
34 changed files with 1094 additions and 156 deletions
@@ -1,10 +1,14 @@
class BeatHaven.Views.ArtistShow extends Backbone.View
template: HoganTemplates["backbone/templates/artists/show"]
template: HoganTemplates["backbone/templates/artist/show"]
initialize: ->
@model.on("change", @render, this)
render: ->
return this if typeof @model.attributes.id is "string"
$(@el).html(@template.render(@model.toJSON()))
if typeof @model.get("artist_bio") != "undefined"
for album_info in @model.get("artist_albums")
for track_info in album_info.album_tracks
track = new BeatHaven.Models.Track(track_info.meta)
BeatHaven.player.tracks.push(track)
$(@el).html(@template.render(@model.toJSON()))
this