Skip to content

Spotify Player - Add Windows support - #22759

Merged
raycastbot merged 7 commits into
raycast:mainfrom
AdrianKokot:spotify-player/add-windows-support
Nov 14, 2025
Merged

raycastbot merged 7 commits into
raycast:mainfrom
AdrianKokot:spotify-player/add-windows-support

Conversation

@AdrianKokot

@AdrianKokot AdrianKokot commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor

Description

  • Added "Windows" to platforms
  • Added check for not running menu bar commands on Windows
  • Changed all shortcuts to support both macOS and Windows

Screencast

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: spotify-player Issues related to the spotify-player extension AI Extension platform: macOS platform: Windows labels Nov 8, 2025
@raycastbot

ghost commented Nov 8, 2025 •

Copy link
Copy Markdown
Collaborator

Thank you for your first contribution! 🎉

🔔 @mattisssa @peduarte @sxn @dillionverma @andreaselia @stuart @tonka3000 @dancannon @pernielsentikaer @stevensd2m @erics118 @hjoelh @hobhouse @jatindotdev @the-devbear @rfaccio @badta5te @andyburris @thomaslombart @rhesamu @mpatel283 @LitoMore @EnneEmme @lineville @tsibog @viethung0823 @eyalevy23 @vmrjnvc @Karthikxp @kartheesan05 @joshkat @Caffeine19 you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

Due to our current reduced availability, the initial review may take up to 10 business days.

ghost left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR adds Windows support to the Spotify Player extension, expanding its reach beyond macOS. The changes primarily focus on making keyboard shortcuts cross-platform compatible and handling Windows-specific limitations. Key modifications include updating all keyboard shortcuts throughout the extension to use platform-specific configurations (Cmd on macOS, Ctrl on Windows), introducing a new helper function isMenuBarAvailable() to disable menu bar commands on Windows (since Windows doesn't support menu bars in Raycast), and adding "Windows" to the supported platforms list. The extension maintains full functionality on macOS while gracefully adapting to Windows platform constraints.

Important Files Changed

Filename Score Overview
extensions/spotify-player/src/devices.tsx 1/5 Missing Keyboard import despite using Keyboard.Shortcut.Common.Refresh - will cause compilation error
extensions/spotify-player/CHANGELOG.md 4/5 Added changelog entry but uses exact date instead of required {PR_MERGE_DATE} template string
extensions/spotify-player/src/helpers/isMenuBarAvailable.ts 5/5 New helper function to check platform availability for menu bar commands
extensions/spotify-player/src/components/FooterAction.tsx 5/5 Updated keyboard shortcuts to support both macOS and Windows platforms
extensions/spotify-player/src/components/PlaylistLikedTracksItem.tsx 5/5 Added cross-platform shortcut support for playlist actions
extensions/spotify-player/src/components/ShowActionPanel.tsx 5/5 Updated shortcuts to work on both macOS and Windows
extensions/spotify-player/src/components/PlaylistActionPanel.tsx 5/5 Cross-platform keyboard shortcut implementation
extensions/spotify-player/src/findLyrics.tsx 5/5 Updated all keyboard shortcuts for cross-platform compatibility
extensions/spotify-player/src/addPlayingSongToPlaylist.tsx 5/5 Added Windows support with proper cross-platform shortcuts

Confidence score: 2/5

  • This PR has significant issues that will prevent it from compiling and deploying successfully
  • Score reduced due to missing import in devices.tsx causing compilation errors and incorrect changelog format violating established guidelines
  • Critical attention needed for devices.tsx import issue and changelog date format correction

Additional Comments (1)

  1. extensions/spotify-player/src/devices.tsx, line 1-12 (link)

    syntax: Missing Keyboard import - add it to the import statement to fix compilation error

9 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment thread extensions/spotify-player/CHANGELOG.md Resolved
@mathieudutour

ghost commented Nov 14, 2025

Copy link
Copy Markdown
Member

There's no need to gate the menubar command, it just won't show on Windows.

However, the extension uses a bunch of AppleScript which I don't see how it would work on Windows

@AdrianKokot

ghost commented Nov 14, 2025

Copy link
Copy Markdown
Contributor Author

@mathieudutour

There's no need to gate the menubar command, it just won't show on Windows.

Yes, it won't show, but the command to display the menu bar is called when using 'next' or 'previous,' and when using this command without a gate, an error shows up. So this gate is only to not show the error on Windows.

However, the extension uses a bunch of AppleScript which I don't see how it would work on Windows

The used AppleScript is only a fallback when an API query fails. I haven't found a way to do similar action in PowerShell. Running the applescript command on Windows just does nothing, so I think that it can stay as it is. It just doesn't do anything on Windows, but primary action with Spotify API works.

@mathieudutour

ghost commented Nov 14, 2025

Copy link
Copy Markdown
Member

The API only works for premium users, doesn't it? Has it changed? It would be nice to handle it properly maybe

@AdrianKokot

ghost commented Nov 14, 2025 •

Copy link
Copy Markdown
Contributor Author

Yes, API is available only for premium users. On Windows there's no way to manipulate app like AppleScript does (in the backgorund)

@mathieudutour

ghost commented Nov 14, 2025

Copy link
Copy Markdown
Member

Could you add an explicit error message on Windows when the API fails because the user isn't premium? It could be really frustrating otherwise

@AdrianKokot

ghost commented Nov 14, 2025

Copy link
Copy Markdown
Contributor Author

I've added PowerShell scripts where it was possible. For two commands I haven't found a way to mimic applescript behaviour, in those scenarios I've added error message.

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks a lot

@raycastbot
raycastbot merged commit 4c92abd into raycast:main Nov 14, 2025
@github-actions

ghost commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 14, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@AdrianKokot).

Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Extension extension fix / improvement Label for PRs with extension's fix improvements extension: spotify-player Issues related to the spotify-player extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants