Skip to content

Fix media key skip behavior - #272

Merged
sozercan merged 4 commits into
sozercan:mainfrom
itsmeshibintmz:fix/skip-media-keys
May 31, 2026
Merged

sozercan merged 4 commits into
sozercan:mainfrom
itsmeshibintmz:fix/skip-media-keys

Conversation

@itsmeshibintmz

Copy link
Copy Markdown
Contributor

Description

Ensure media key skip actions advance to the next track (instead of restarting) when Kaset is in the background by handling skip forward/back remote commands and routing them based on the selected media control style.

AI Prompt

馃 AI Prompt Used

AI Tool: GitHub Copilot (GPT-5.2-Codex)

Type of Change

  • 馃悰 Bug fix (non-breaking change that fixes an issue)

Related Issues

Fixes #255

Changes Made

  • Add skip forward/back handlers to MPRemoteCommandCenter.
  • Route skip commands to next/previous when the setting uses Next/Previous Track.
  • Seek forward/back by the skip interval when using Skip Forward/Backward mode.

Testing

  • swift build
  • swiftlint --strict && swiftformat .
  • swift test (runTests tool; all passed)
  • Manual: Media key skip while another app is frontmost

Checklist

  • My code follows the project's style guidelines
  • I have run swiftlint --strict && swiftformat .
  • Build passes locally
  • New and existing unit tests pass locally
  • I have added tests that prove my fix/feature works
  • I have updated documentation if needed
  • My changes generate no new warnings

Copilot AI review requested due to automatic review settings May 28, 2026 16:51

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for skip forward/backward remote commands (Control Center / media keys) in the now playing manager, with behavior configurable based on the user's media control style setting.

Changes:

  • Registers skipForwardCommand and skipBackwardCommand handlers with a default 15-second interval.
  • Adds teardown for the new commands and a unified handleSkipCommand helper that either invokes next/previous or seeks by the requested interval.
  • Introduces a SkipDirection enum and a shared defaultSkipInterval constant.

馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Sources/Kaset/Services/Player/NowPlayingManager.swift Outdated
Comment thread Sources/Kaset/Services/Player/NowPlayingManager.swift

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

馃挕 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b536bfeca

鈩癸笍 About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 馃憤.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/Kaset/Services/Player/NowPlayingManager.swift Outdated
Copilot AI review requested due to automatic review settings May 28, 2026 17:13

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread Sources/Kaset/Services/Player/NowPlayingManager.swift
Comment thread Sources/Kaset/Services/Player/NowPlayingManager.swift Outdated
Comment thread Sources/Kaset/Services/Player/NowPlayingManager.swift Outdated
@sozercan
sozercan merged commit f46f838 into sozercan:main May 31, 2026
6 checks passed
@sozercan sozercan linked an issue Jun 8, 2026 that may be closed by this pull request
1 task
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.

[Bug]: Skip restarts song instead of skipping [Bug]: Song not skipping when using bluetooth headset or Now Playing view

3 participants