mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-07 02:33:39 +02:00
Use better identifier for generated covers
Makes sure that covers look the same, no matter if generated from an album or individual track
This commit is contained in:
parent
042d56bd24
commit
af344d290b
1 changed files with 2 additions and 1 deletions
|
|
@ -11,7 +11,8 @@
|
|||
(defn palette
|
||||
"Generate a hsl palette of two colors that's unique for a given item"
|
||||
[item]
|
||||
(let [[h s l] (js->clj (.hsl color-hash (str (:name item) (:artist item))))
|
||||
(let [identifier (str (:artistId item) "-" (or (:albumId item) (:id item)))
|
||||
[h s l] (js->clj (.hsl color-hash identifier))
|
||||
s (str (* 100 s) "%")
|
||||
l (str (* 100 l) "%")]
|
||||
(->>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue