Conversation
Adds an AppleScript-based KasetController (modeled on AppleMusicController) so boring.notch can display and control playback from Kaset, a native macOS YouTube Music client -- play/pause, next/previous, seek, volume, shuffle, repeat, and the like/heart via Kaset's `like track` command. State is read from Kaset's `get player info` JSON and refreshed on a short poll plus Kaset's `com.sertacozercan.Kaset.playerInfo` distributed notification. Registers the source in MediaControllerType, MusicManager, onboarding, Settings, and the apple-events entitlement exception. All published state is mutated on the main actor and emissions are change-gated; the displayed track is cleared when Kaset isn't running. Closes TheBoredTeam#1167
Author
|
Related Kaset PR: |
This was referenced Jun 30, 2026
Member
|
It seems like there are several competing Kaset implementations, none of which are merged yet into Kaset. Until one is picked by the maintainer and merged, Kaset will not be supported. |
added 3 commits
July 2, 2026 16:39
…a timeout A hung target app (e.g. Kaset with a broken API, but also Music/Spotify) made NSAppleScript.executeAndReturnError block for up to the Apple Event timeout. Because it ran via Task.detached on Swift's shared cooperative thread pool, the 2s poll piled up blocked calls and starved the pool, freezing the whole app/notch. Run the blocking call on a dedicated serial DispatchQueue (isolated from the cooperative pool, single blocked thread max) and add a caller-side timeout so a hung app leaves data stale instead of wedging the UI.
…k peek Kaset is a WKWebView YouTube Music client; its audio is rendered in the com.apple.WebKit.GPU helper, not its own process. Three consequences fixed: - Waveform: a process tap on Kaset captures silence, so once capture spun up the visualizer switched from the synthetic animation to a flat real waveform. Skip real-time capture for out-of-process (webview) sources so it keeps the synthetic animation. - Sneak peek/flip repeating every ~2s: applyPlayerInfo copied the previous track's cover forward, so at a track change MusicManager's artwork-gated content bookkeeping never advanced and re-fired every poll. Clear the carried-forward artwork on track-identity change. - Intermittent cover: fetchArtworkIfNeeded marked a URL done before the fetch, so a failed/non-image fetch (Kaset occasionally reports the YT Music homepage URL) never retried. Remember the URL only after a valid image decodes; otherwise retry on the next poll. (cherry picked from commit 1afa6638679ceb61d733ea4ef3edc55e90f0d3de)
Kaset's `get player info` reports artworkURL as the YouTube Music homepage (https://music.youtube.com/, HTML) for essentially every track, so the cover fell back to the app icon. It does provide a videoId, so derive the cover from YouTube's thumbnail endpoint (maxresdefault, falling back to the always-present hqdefault). Center-crop to a square and re-encode (also validates it decoded) because thumbnails are 16:9/4:3 and the notch renders cover art with .fit. A genuine image artworkURL, if Kaset ever provides one, is still tried first. (cherry picked from commit 748cf01b444aa64f598eb0aaa7804b78d62f0359)
Author
|
Added couple of bug fixes |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Kaset (sozercan/kaset) — a native macOS YouTube Music client — as a selectable music source. boring.notch can now display and control Kaset playback (play/pause, next/previous, seek, volume, shuffle, repeat) and toggle the like/heart, the same way it integrates Apple Music and Spotify.
Why
Closes #1167. Kaset users had no way to surface or control playback from the notch. Kaset exposes a full AppleScript suite plus a
com.sertacozercan.Kaset.playerInfodistributed notification, so it can be supported cleanly with a dedicated controller.How
KasetController(modeled onAppleMusicController/SpotifyController), reading state from Kaset'sget player infoJSON and driving transport/like via its AppleScript commands. State refreshes on a short poll plus Kaset's distributed notification.MediaControllerType,MusicManager.createController, the onboarding + Settings pickers, and added thecom.sertacozercan.Kasetapple-events entitlement exception.@Publishedstate mutation is@MainActor-isolated, emissions are change-gated viaPlaybackState: Equatable, and the displayed track is cleared when Kaset isn't running.Testing
xcodebuild -scheme boringNotch -configuration Debug build→ BUILD SUCCEEDED).Kaset.sdefandScriptCommands.swift(transport +seek;position/duration/volumenumeric types;repeating/likeStatustoken casing; bundle idcom.sertacozercan.Kaset).Screenshots / recording