Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add error handling to keyboard shortcuts for song navigation #3275

Closed
wants to merge 1 commit into from

Conversation

Sk16er
Copy link

@Sk16er Sk16er commented Jan 24, 2025

Description

This pull request adds error handling to the keyboard shortcuts for song navigation in the keyboardShortcut.js file. The changes ensure that any errors encountered while invoking Spicetify.Player.next() and Spicetify.Player.previous() are logged to the console for easier debugging.

Changes

  • Added try-catch blocks around the callback functions for the ctrl+right and ctrl+left keybindings.
  • Logged errors using console.error if an exception occurs.

Reason for Changes

  • To enhance the robustness of the keyboard shortcuts and provide better error logging for debugging purposes.

### Description

This pull request adds error handling to the keyboard shortcuts for song navigation in the `keyboardShortcut.js` file. The changes ensure that any errors encountered while invoking `Spicetify.Player.next()` and `Spicetify.Player.previous()` are logged to the console for easier debugging.

### Changes
- Added `try-catch` blocks around the callback functions for the `ctrl+right` and `ctrl+left` keybindings.
- Logged errors using `console.error` if an exception occurs.

### Reason for Changes
- To enhance the robustness of the keyboard shortcuts and provide better error logging for debugging purposes.
@rxri
Copy link
Member

rxri commented Jan 24, 2025

Did you even test what AI changed? because I guess you didn't. There's no need for this.

@rxri rxri closed this Jan 24, 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.

2 participants