1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

Fix artist and album views

This commit is contained in:
Arne Schlüter 2018-08-22 18:16:38 +02:00
commit 5bfc883de9
2 changed files with 12 additions and 9 deletions

View file

@ -34,7 +34,9 @@
(defmethod -route-events ::artist-view
[route-id params query]
[:api/request "getArtist" (select-keys params [:id])])
(let [params (select-keys params [:id])]
[[:api/request "getArtist" params]
[:api/request "getArtistInfo2" params]]))
(defmethod -route-events ::album-view
[route-id params query]

View file

@ -13,20 +13,21 @@
;; TODO: Find better names and places for these.
(defn album-detail [content]
(defn album-detail [{:keys [album]}]
[:div
[:h2.title (str (:artist content) " - " (:name content))]
[song/listing (:song content)]])
[:h2.title (str (:artist album) " - " (:name album))]
[song/listing (:song album)]])
(defn artist-detail [content]
(defn artist-detail [{:keys [artist artist-info]}]
[:div
[:h2.title (:name content)]
[album/listing (:album content)]])
[:h2.title (:name artist)]
[:div.content>p {:dangerouslySetInnerHTML {:__html (:biography artist-info)}}]
[album/listing (:album artist)]])
(defn most-recent [content]
(defn most-recent [{:keys [album-list]}]
[:div
[:h2.title "Recently played"]
[album/listing (get-in content [:album-list :album])]])
[album/listing (:album album-list)]])
(defn sidebar [user]
[:aside.menu.section