                                     (utils/encode artist)
                                     (utils/encode album-name))
         tracks (album "tracks")
-        artist-url (utils/format "#/artists/%s" artist)]
+        artist-url (utils/format "#/artists/%s" artist)
+        track-ids (map (fn [t] ((t "track") "id")) tracks)
+        track-urls (map (partial mk-track-url artist album-name)
+                        track-ids)
+        play-album (fn [e] (put! track-list track-urls))]
     (if (and (not (nil? artist)) (not (nil? album)))
       [:div 
        [:a {:href artist-url} [:h1 artist]]
        [:h2 album-label]
        [:a.download {:href album-zip-url}
         [:i.fa.fa-download.fa-lg]]
+       [:i.fa.fa-play-circle.fa-lg {:on-click play-album}]
        [:img {:src album-image}]
        [:ul.tracks
         (map (fn [track] (track-detail track add-to-playlist)) tracks)]

            [secretary.core :as secretary]))

(def nav-seq (concat (map str "#abcdefghijklmnopqrstuvwxyz") ["all"]))

(def track-list (chan))
(def player-ctrl (chan))


(defn nav-item [x]
  (let [nav-url (utils/format "#/nav/%s" (utils/encode x))]

        artist (t "artist_canonical")
        album (t "album_canonical")
        duration (t "duration")
        track-url (mk-track-url artist album track-id)
        track-label (utils/format "%s. %s" track-num track-title)]
    [:li
     [:a {
          :on-click (fn [e] (put! track-list [track-url]))}
      track-label
      [:div.right (format-duration duration)]]]))

