Fabrizz / MMM-OnSpotify

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

Configuration file being ignored. #2

Closed tbell19 closed 1 year ago

tbell19 commented 1 year ago

Here is my config { module: "MMM-OnSpotify", position: "bottom_right", / bottom_left, bottom_center / config: { clientID: "[redacted]", clientSecret: "[redacted]", accessToken: "[redacted]" refreshToken: "[redacted]", displayWhenEmpty: "none", spotifyCodeExperimentalShow:false, hideTrackLenghtAndAnimateProgress: true } },

The module is still displaying the spotify code, and it is still displaying whenever I am not playing anything. Also having major performance issues, but I am on a raspberry pi 3A so I think if I can disable some of the more graphics intensive options it should resolve the issue.

Fabrizz commented 1 year ago

You have to put the entire object of options. For some reason I thought that MM2 deepmerged the objects, but you have to enable in manually in the module cfg. The next update fixes a couple of things (including this issue).

Copy the entire theming object in your config and change the options that you want.

And yes, even a RPI4 struggles with the blur/transitions, when all the animations are enabled it looks awesome, but I don't know how to optimize them, the color extraction already uses webworkers.

Fabrizz commented 1 year ago

Just updated! Using the objects as options is still allowed, but I decided to change to use the options directly in the configuration entry, as MM2 did not merge the defaults correctly.

{
   module: "MMM-OnSpotify",
       position: "bottom_right",
       config: {
           // Spotify authentication (Authentication Service / Migration from MMM-NowPlayingOnSpotify)
           clientID: "key",
           clientSecret: "key",
           accessToken: "key",
           refreshToken: "key",

           // General module options [SEE BELOW]
           advertisePlayerTheme: true,
           displayWhenEmpty: "both",
           userAffinityUseTracks: false,
           prefersLargeImageSize: false,
           hideTrackLenghtAndAnimateProgress: false,
           showDebugPalette: true,
           userDataMaxAge: 14400,
           userAffinityMaxAge: 36000,

           // Update intervals [SEE BELOW]
           isPlaying: 1,
           isEmpty: 2,
           isPlayingHidden: 2,
           isEmptyHidden: 4,
           onReconnecting: 4,
           onError: 8,

           // Animations [SEE BELOW]
           mediaAnimations: false,
           fadeAnimations: false,
           transitionAnimations: true,

           // Spotify Code (EXPERMIENTAL)
           spotifyCodeExperimentalShow: true,
           spotifyCodeExperimentalUseColor: true,
           spotifyCodeExperimentalSeparateItem: true,

           // Theming General
           roundMediaCorners: true,
           roundProgressBar: true,
           useColorInProgressBar: true,
           useColorInTitle: true,
           useColorInUserData: true,
           showBlurBackground: true,
           blurCorrectionInFrameSide: true,
           blurCorrectionInAllSides: true,
           alwaysUseDefaultDeviceIcon: true,
           },
       }
},