fix: make playback work on Windows#4
Merged
SuperCoolPencil merged 1 commit intoMay 12, 2026
Conversation
- plex: tolerate boolean flags on stream metadata (Plex now returns default/forced/selected/external as JSON booleans on some servers; decoder choked when it expected ints, breaking ResolvePlayable). - player: auto-detect mpv/vlc on Windows and use `cmd /c start "" <url>` as the system-default fallback so users without a configured player aren't routed through xdg-open. - player: switch mpv IPC to named pipes on Windows via go-winio, with build-tagged mpvipc_unix.go / mpvipc_windows.go. Live progress reporting and 90%-auto-mark-watched now work on Windows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SuperCoolPencil
approved these changes
May 12, 2026
Owner
|
Hi @joshkerr The changes look good, Just wanted to confirm: Does playback on windows work after fixing these? |
Author
|
Yes. It works fine.
…On Tue, May 12, 2026 at 11:17 AM Meet Mehta ***@***.***> wrote:
*SuperCoolPencil* left a comment (SuperCoolPencil/cue#4)
<#4 (comment)>
Hi @joshkerr <https://github.com/joshkerr>
The changes look good, Just wanted to confirm: Does playback on windows
work after fixing these?
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAELGCNGBTRO5L7W7P6GCD42NFBVAVCNFSM6AAAAACY2YNAE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DIMZSGI4TGNZQGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.
Summary
Three independent fixes that together make
cueusable on Windows. I hit these in order trying to play a movie with mpv (installed via scoop) on Windows 11.1. Plex JSON decoder rejects boolean stream flags
Plex now returns stream flags (
default,forced,selected,external) as JSON booleans on some servers, butplex.Streamdeclared them asint.ResolvePlayablefailed with:…which surfaced in the TUI as a generic "failed to parse response" when pressing play. Fixed by introducing a
flexBooltype that accepts both forms.2. No Windows path in the player launcher
detectPlayeronly handleddarwin/linux, so on Windows it fell through tolaunchDefault, which ranxdg-open— not a thing on Windows. Added awindowsPlayerslist (mpv, vlc) and switched the default fallback tocmd /c start "" <url>.3. mpv IPC used Unix domain sockets
net.Dial("unix", …)doesn't work on Windows — mpv's--input-ipc-serveruses named pipes there. The scrobbler degraded gracefully (warn + exit-only reporting), so playback worked but live progress and 90%-auto-mark-watched did not.Split
mpvipc.gointo:mpvipc.go— sharedmpvConntype and methodsmpvipc_unix.go(//go:build !windows) — existing Unix-socket dial +%TEMP%/cue-mpv-<ns>.sockpathmpvipc_windows.go(//go:build windows) —winio.DialPipeagainst\.\pipe\cue-mpv-<ns>Also broadened the mpv-command check in
launchConfiguredsompv.exeand paths with backslashes enable IPC. Added/cue.exeto.gitignore.Adds one new dependency:
github.com/Microsoft/go-winio v0.6.2.Test plan
go build ./...on Windowsgo vet ./...on Windowsgo test ./...on Windows — all packages passGOOS=linux go build ./...GOOS=darwin go build ./...🤖 Generated with Claude Code