mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
• Renamed "Base64Image" to "Thumbnail:
• Minor CSS bug fixes • Fully documented python script
This commit is contained in:
@@ -74,7 +74,7 @@ async function UpdatePlayerState(data) {
|
||||
const timelineProps = targetSession.timeline_properties;
|
||||
|
||||
// Calcualte an accent color
|
||||
const accentColorPalette = await GetAccentPalette(mediaProps.Base64Image);
|
||||
const accentColorPalette = await GetAccentPalette(mediaProps.Thumbnail);
|
||||
|
||||
// 1. Check if playback status has changed and update visibility accordingly
|
||||
if (playbackInfo.PlaybackStatus !== CurrentPlaybackStatus) {
|
||||
@@ -168,7 +168,7 @@ async function ChangeTrack(mediaProps, tintColor) {
|
||||
artistLabel.innerText = swapArtistTrack ? mediaProps.Title : mediaProps.Artist;
|
||||
|
||||
// Extract the image source string (use fallback if Windows has no art)
|
||||
const newArtUrl = mediaProps.Base64Image;
|
||||
const newArtUrl = mediaProps.Thumbnail;
|
||||
|
||||
// Set the image
|
||||
backgroundLayer.style.backgroundImage = `url('${newArtUrl}')`;
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
#art-layer {
|
||||
#album-art-layer {
|
||||
z-index: 1;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
#art-transition-layer {
|
||||
#album-art-transition-layer {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
position: relative; /* Keeps it in the document flow */
|
||||
z-index: 2; /* Sits above the background-layer */
|
||||
|
||||
padding: 1.5em 1.25em;
|
||||
padding: 2em 1.75em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3em;
|
||||
|
||||
@@ -69,7 +69,7 @@ async function UpdatePlayerState(data) {
|
||||
const timelineProps = targetSession.timeline_properties;
|
||||
|
||||
// Calcualte an accent color
|
||||
const accentColorPalette = await GetAccentPalette(mediaProps.Base64Image);
|
||||
const accentColorPalette = await GetAccentPalette(mediaProps.Thumbnail);
|
||||
|
||||
// 1. Check if playback status has changed and update visibility accordingly
|
||||
if (playbackInfo.PlaybackStatus !== CurrentPlaybackStatus) {
|
||||
|
||||
@@ -165,7 +165,7 @@ async function ChangeTrack(mediaProps) {
|
||||
artistLabel.innerText = swapArtistTrack ? mediaProps.Title : mediaProps.Artist;
|
||||
|
||||
// Extract the image source string (use fallback if Windows has no art)
|
||||
const newArtUrl = mediaProps.Base64Image;
|
||||
const newArtUrl = mediaProps.Thumbnail;
|
||||
// const accent = mediaProps.AccentColor || "#ffffff";
|
||||
|
||||
// Set the image
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
#art-layer {
|
||||
#album-art-layer {
|
||||
z-index: 1;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
#art-transition-layer {
|
||||
#album-art-transition-layer {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ async function UpdatePlayerState(data) {
|
||||
const timelineProps = targetSession.timeline_properties;
|
||||
|
||||
// Calcualte an accent color
|
||||
const accentColorPalette = await GetAccentPalette(mediaProps.Base64Image);
|
||||
const accentColorPalette = await GetAccentPalette(mediaProps.Thumbnail);
|
||||
|
||||
// 1. Check if playback status has changed and update visibility accordingly
|
||||
if (playbackInfo.PlaybackStatus !== CurrentPlaybackStatus) {
|
||||
@@ -168,7 +168,7 @@ async function ChangeTrack(mediaProps, tintColor) {
|
||||
artistLabel.innerText = swapArtistTrack ? mediaProps.Title : mediaProps.Artist;
|
||||
|
||||
// Extract the image source string (use fallback if Windows has no art)
|
||||
const newArtUrl = mediaProps.Base64Image;
|
||||
const newArtUrl = mediaProps.Thumbnail;
|
||||
|
||||
// Set the image
|
||||
backgroundLayer.style.backgroundImage = `url('${newArtUrl}')`;
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
#art-layer {
|
||||
#album-art-layer {
|
||||
z-index: 1;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
#art-transition-layer {
|
||||
#album-art-transition-layer {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user