mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
Fix artist and album views
This commit is contained in:
parent
2cdae0d683
commit
5bfc883de9
2 changed files with 12 additions and 9 deletions
|
|
@ -34,7 +34,9 @@
|
||||||
|
|
||||||
(defmethod -route-events ::artist-view
|
(defmethod -route-events ::artist-view
|
||||||
[route-id params query]
|
[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
|
(defmethod -route-events ::album-view
|
||||||
[route-id params query]
|
[route-id params query]
|
||||||
|
|
|
||||||
|
|
@ -13,20 +13,21 @@
|
||||||
|
|
||||||
;; TODO: Find better names and places for these.
|
;; TODO: Find better names and places for these.
|
||||||
|
|
||||||
(defn album-detail [content]
|
(defn album-detail [{:keys [album]}]
|
||||||
[:div
|
[:div
|
||||||
[:h2.title (str (:artist content) " - " (:name content))]
|
[:h2.title (str (:artist album) " - " (:name album))]
|
||||||
[song/listing (:song content)]])
|
[song/listing (:song album)]])
|
||||||
|
|
||||||
(defn artist-detail [content]
|
(defn artist-detail [{:keys [artist artist-info]}]
|
||||||
[:div
|
[:div
|
||||||
[:h2.title (:name content)]
|
[:h2.title (:name artist)]
|
||||||
[album/listing (:album content)]])
|
[:div.content>p {:dangerouslySetInnerHTML {:__html (:biography artist-info)}}]
|
||||||
|
[album/listing (:album artist)]])
|
||||||
|
|
||||||
(defn most-recent [content]
|
(defn most-recent [{:keys [album-list]}]
|
||||||
[:div
|
[:div
|
||||||
[:h2.title "Recently played"]
|
[:h2.title "Recently played"]
|
||||||
[album/listing (get-in content [:album-list :album])]])
|
[album/listing (:album album-list)]])
|
||||||
|
|
||||||
(defn sidebar [user]
|
(defn sidebar [user]
|
||||||
[:aside.menu.section
|
[:aside.menu.section
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue