Fabrizz / MMM-OnSpotify

Highly customizable MM2 module that displays what you are listening to in Spotify. Compatible with MMM-LiveLyrics and DynamicTheming.
MIT License
53 stars 9 forks source link

Suggestion #57

Closed greedyvegan closed 3 months ago

greedyvegan commented 3 months ago

1 - is it possible to use the current song's album colors as the theme? 2 - how can I apply other items (background colors) to change with the current song?

Fabrizz commented 3 months ago

1

Currently no, as it would mean downloading 2 images per song, and that data is not passed from the node_helper (And I don't know if its exposed directly by the current player or I need to send anotherAPI call to get the album data)

2

You can use experimentalCSSOverridesForMM2 link

Here you would use the option with CSS variables to change other styles, example to set the background:

experimentalCSSOverridesForMM2: [
    ["--color-background", "background"] // Background is the module reference to a muted background color from the palette, you could use ex.: "palette_muteddark"
]
greedyvegan commented 3 months ago

forgive me for being slow, can I target specific modules and or their backgrounds or specific text to adhere to the theme?

Fabrizz commented 3 months ago

You need to add CSS variables to your css/custom.css in your magic mirror file: (More info on CSS vars)

/* css/custom.css */
:root {
  --my-new-color-variable: #fff; /* A new css variable, with white as default */
}

.module-name { /* Check using the devtools the module name */
   background-color: var(--my-new-color-variable) !important;
}
/* In module config */
experimentalCSSOverridesForMM2: [
    ["--color-background", "background", "#fff"]
]
greedyvegan commented 3 months ago

ok thank you. my module stopped working, how do I know how many API pulls I get because I believe I've depleted it because it stopped appearing on my mirror

Fabrizz commented 3 months ago

With basic configuration you never pass the max api limit per second, even if you did you would get rate limited but the module should just say a warning.

Have you modified anything?

greedyvegan commented 3 months ago

This is in my config:

{module: "MMM-OnSpotify", hiddenOnStartup: true, header: "Now Playing on Spotify", position: "bottom_right", /* bottom_left, bottom_center */ config: { clientID: "my client ID", clientSecret: "my client secret", accessToken: "my access token", refreshToken: "my refresh token", /* Add here your theming and behaviour configurations */ /* Example */ experimentalCSSOverridesForMM2: [ ["--color-text-dimmed", "background", "palette_vibrantlight"], ["--ONSP-OVERRIDES-ICONS-COLOR", "palette_vibrantlight"], /* View custom.css */ ], } },

my custom css: .MMM-OnSpotify {position:relative}

Fabrizz commented 3 months ago

Hey, can you share your electron logs? Pressing F12 will bring the devtools, then you can press the "console" tab.

greedyvegan commented 3 months ago

do you want the whole log or something specific?

Fabrizz commented 3 months ago

Just the messages sent by the module, or all the log, whatever is easier

greedyvegan commented 3 months ago
Screenshot 2024-03-24 at 2 34 39 PM
greedyvegan commented 3 months ago

the previous was while nothing was playing via spotify, this one is while a song is playing

Screenshot 2024-03-24 at 2 36 58 PM
Fabrizz commented 3 months ago

No errors? even from other modules?, the module does not show the song right?

greedyvegan commented 3 months ago

just one, from the calendar module, that one always comes up, even though its displaying properly.

Screenshot 2024-03-24 at 2 39 29 PM

the module does show the song, now. when I mentioned it the day before yesterday, it wasn't showing; hence why I asked if maybe I've depleted my api requests. Yesterday it started showing.