gbmusic: fix dynamic track/album colors
Not really broken, just didn't do what it saidmaster
parent
1c1e73720a
commit
546b5e819a
|
|
@ -1,3 +1,4 @@
|
|||
0.01: Initial version
|
||||
0.02: Increase text brightness, improve controls, (try to) reduce memory usage
|
||||
0.03: Only auto-start if active app is a clock, auto close after 1 hour of inactivity
|
||||
0.04: Minor bugfix
|
||||
|
|
|
|||
|
|
@ -138,16 +138,13 @@ function infoColor(name) {
|
|||
s = 0;
|
||||
} else {
|
||||
// make color depend deterministically on info
|
||||
let code = 0;
|
||||
let code = textCode(info[name]);
|
||||
switch(name) {
|
||||
case "track":
|
||||
code += textCode(info.track);
|
||||
// fallthrough: also use album+artist
|
||||
case "album":
|
||||
case "track": // also use album
|
||||
code += textCode(info.album);
|
||||
// fallthrough: also use artist
|
||||
default:
|
||||
code += textCode(info[name]);
|
||||
// fallthrough
|
||||
case "album": // also use artist
|
||||
code += textCode(info.artist);
|
||||
}
|
||||
h = code%360;
|
||||
s = 0.7;
|
||||
|
|
|
|||
Loading…
Reference in New Issue