Skip to content

Conversation

joelmathewthomas
Copy link
Contributor

@joelmathewthomas joelmathewthomas commented Jun 15, 2025

This PR includes a set of improvements and fixes for the Spotify Player widget:

Bugfix

  • Properly handle device inactivity by checking for empty responses (204 No Content) from the Spotify API. Previously, this caused the widget to display nothing when no device was active.

Improvements

  • Refined styling of .widget-content-frame elements:

    • Added padding and margins

    • Enabled frame and title display

    • Adjusted heading levels for better layout consistency

    • Centered the Play/Pause buttons

New Feature

  • Added the ability to click on items in the upcoming queue to skip directly to that track.

Other

  • Update README.md

Screenshots

  • Before

image

  • After

image

  • Bugfix

image

  • New Feature: Play from queue
feature.mp4

The handling of device inactivity wasn’t implemented properly earlier. When the device is inactive, the request:

{{ $currentlyPlaying := newRequest "https://api.spotify.com/v1/me/player"
                    | withHeader "Authorization" (print "Bearer " $accessToken)
                    | getResponse
                }}

returns an empty response with a 204 status code.

To address this, I’ve added a new check for this specific condition. Previously, since this case wasn’t accounted for, the widget would display nothing whenever the device was inactive.
- Added margins and padding to the div containers with class `widget-content-frame`
- Enabled frame and title.
- Changed the Now Playing and Upcoming titles form h1 to h5.
@joelmathewthomas joelmathewthomas changed the title Improve device inactivity handling, styling, and add play from queue feature. fix device inactivity handling, improve styling, and add play from queue feature. Jun 19, 2025
@anant-j
Copy link
Contributor

anant-j commented Jul 16, 2025

Looks good. Thanks for the updates!!

@svilenmarkov svilenmarkov merged commit 58239ff into glanceapp:main Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants