connect() kept the last server's state while dialling the next; the
shell saw its media on arrival and opened the player (full, on a
friend's server) over the new, empty one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
media_kit sets vo=libmpv before the render context exists; an open in
between failed mpv's video output ("No render context set") and played
black with sound. Seen on X11 joining a server with media already up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- What's next is the server's: state.advance counts down (10 s) when the
media finishes with an Up next item first, holds while its performer or
warm source is gone, and sets queuePlay at its end; cancel is shared, a
seek or swap ends it; the server skips items nobody can put up. Shared
rules in core whats_next.dart; the app's janitor, per-screen countdown
and end-of-episode card are gone.
- The continuation (next Jellyfin episode, next file of a local show
with its gaps) is an auto item under "Continues with", prepared like
Up next's first item.
- Watch tracking by time In (D3): only time played while this viewer is
in counts; away, paused, held, jumps and stalls never do (P7, P9).
WatchTracker + device WatchHistory (files, links); Jellyfin progress
reads the same watch; records are the AniList seam.
- A server restart no longer loses what played: apps hold their media
and one offers it back (swap.restore, first offer wins), Up next is
re-added, the source re-feeds, and the watch carries on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flutter >= 3.38 keeps its EGL contexts on the raster thread, so
media_kit's video output found none on the platform thread and fell
back to software rendering (no shaders, ~5 fps) on X11. The patched
output opens Flutter's EGL display itself, steps GDK's GLX context aside
on X11 and releases its own context. Patch from a friend's agent, kept
in third_party/media_kit_video/starsync/. Wayland/NVIDIA still renders
on the GPU (checked); the X11 path was verified on the friend's machine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- PlayerHost port (MediaKitHost): players by role, pins, hwdec policy,
render probe, log routing, disposal order; the only media_kit user.
- MediaPipeline: plan (one pure switch over state, origin, caps,
presence) -> resolve -> open (prepared player promoted, else fresh)
-> ready; commands queued during a switch apply once (P15); viewers
play the buffer and wait for a dropped source without seek loops (D6).
- Every web page resolved by our yt-dlp into an EDL with headers and
cookies (danmaku excluded); mpv's ytdl_hook no longer used (ytdl=no).
- D11: sign-in errors say which cookies were used and whether they hold
any for the site.
- Relay: 256 KiB slices read as they fill, superseded pulls released
(seek-to-play ~4.2 s -> ~2.8 s, P29); own Jellyfin relay channel only
when someone needs it (P28).
- STARSYNC_SMOKE run and a Windows CI smoke step after the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- L1 (core, offline): release names with kinds (episode, movie, extra:
OP/ED/Opening/Ending/NC/PV/OVA…), folder hints (season and name from
parentheticals, ranges), one show across folders, gaps and next with
skipped numbers, junk ignored, stable keys.
- L2 (app, device-owned cache): AniList match with synonyms and
sequel walking, episode mapping across cours (AnimeFlow runs when
signed in), art and episode titles, "Wrong show?" pins per show or
folder, episode offsets; lazy, spaced requests, works offline.
- Files tab as a library: poster cards, show pages with banner, gap
prompt, extras, movies, Wrong show? and Episode numbers.
- media.ref produced for local files, Jellyfin (provider ids) and links,
carried in swaps and Up next; receivers name media from it.
- Hosting relays each Jellyfin item through its own server's login.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One server per app run (loopback, no password); Invite attaches an
all-interfaces listener to the same server and Stop sharing detaches
it (guests told with 4016); members, media and Up next never reset.
No solo mode: you're home on your own server unless in a friend's.
- Navigation: none / yours / friend; a join passes a version gate on
/health first (clear "they/you need to update", update offer).
- Invite as a value (host, port, name, password flag, version, fp
reserved); addresses filtered (loopback, link-local, 198.18/15,
bridges) and ranked; Sharing chip, Copy invite, Stop sharing.
- Alone looks like a plain player (alone replaces solo).
- AppGraph builds and disposes systems; widgets use AppScope;
SessionState deleted; a test caps the remaining singletons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Status: computed from connection, presence, hold, relay, player facts;
no setters (health writes and HealthStatus gone); pill, strip and
source line read it; transitions go to the Notifier.
- Notifier: noticeFor(event, context) with self presence, alone, window
activity, playing and prefs; toasts for joins/leaves/returns/swaps/
Up next adds (with picture)/problems/chat, the rest logged; while
sitting out only chat, nudges, starting, Up next (+ joins if chosen);
alone no social notices; replayed lines logged; owns its toast timer.
- System notifications (flutter_local_notifications: D-Bus on Linux,
WinRT on Windows) when the window isn't focused; a click focuses it.
- Toasts sit above the control bar and move with it.
- Versions: each member's in the members card and avatar tooltip,
the server's in the card header; the strip no longer shows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Server and core: version ranges on both sides with a coded refusal; a
client id maps to the same member and token for the server's life; a
drop is `gone` for a 10-minute grace keeping ready, presence, queue
items, relay and avatar; `bye` leaves at once; ordered takeover (seq,
replaced/stale); presence joining/in/away/gone with one PresencePolicy;
joiners never pause playback and hold a held gate at most ~15 s;
state.hold; feed ids, seq and replay; the relay lives through its
source's grace and continues on re-dial; queue `by` lasting, auto
items and cancel; MediaRef carried; client ids never logged.
App: persisted client id and seq; Connection with unstable/lost/
replaced states, backoff with jitter, no lost/back pair per flap; a drop
keeps the session (state, player, media, relay source); presence in the
strip and members card; sit out = away intent; feed matched by id;
auto sit-out (idle when not playing, minimised for a while; never when
alone) replaces auto-unready; bye on close and Leave, not on update
restart; relay source re-dials through its grace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Linux app id dev.foxyz.starsync, binary starsync; Windows starsync.exe,
company foxyz; server starsync-server; Dart package starsync; archives
starsync-<ver>-*.
- 1.2.x compatibility: watch_together and watch-together-server
launchers (Linux) / copies (Windows) in the archive; the updater
accepts both names and relaunches the new binary; update.sh/.bat use
whichever server exists.
- First start copies (never moves) the old support folder and this
app's Hive boxes out of ~/Documents into <support>/hive; a marker
makes it run once; AppDirs is a port; settings schema version with
ordered migrations.
- Launcher entry dev.foxyz.starsync.desktop; the old one removed.
- Repository name and URLs unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- notice_table_test: one row per AppEvent variant through noticeFor.
- FlakyProxy (core/testing.dart): pass, blackhole (half-open), delay,
hold, cut after N bytes, reset; demo tests against today's server.
- Liveness (stale/drop/ping) on the engine clock, so grace can be tested
with a fake clock; Connection takes an injectable clock.
- AppDirs with STARSYNC_PROFILE=<name>: separate data and logs, so two
instances run on one machine.
- DEVELOPMENT: scenario list per restructure step; test tags follow the
new step order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Connection owns the socket lifecycle, connect/dial with epochs,
reconnect, the clock offset, diagnostics upload and a sealed ConnState
signal; the hello is built by an injectable builder, the resume token
stays private, and the reconnect delay and silence limit are parameters.
The coordinator maps ConnState to the same health texts and keeps the
reconnect restore and drop handling (step 1 replaces them).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Tests: the four known failures fixed (test-side causes), one duplicate
file and four detail-pinning cases removed, every test that pins
behaviour the restructure changes tagged with its step.
- Every toast, sound and activity-log line goes through Notifier.notify
(AppEvent), mapped one-to-one to today's behaviour.
- Platform ports (shell, URLs, folders, link resolver, system
notifications) with desktop implementations; window_manager, Process
and file_picker now live only in platform/desktop/.
- ROADMAP: protocol 16 planned; app id dev.foxyz.starsync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Close: hide the window, dispose every player, thumbnail job and the
sound engine, leave, then close normally; Linux runner _exit (the
NVIDIA EGL exit handler crashed 10/10 closes, 0/41 now); Windows tears
down inside the message loop, then TerminateProcess; watchdogs.
- Version under the Settings tab; an update band instead of a dot,
never over a video; checks at start and every 4 hours.
- Chat pop-ups default to All again.
- Shader read-back compared as a list (old mpv joins with ','), so
Windows stops turning shaders off; Windows hwdec auto-copy.
- Render diagnostics (`mpv: render` lines); RAM-only demuxer cache pin
silences the file-cache warning; a volume readout test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SoundEngine (platform/audio) opens the device once (2 s after start,
or on the first sound), loads each synthesized sound into memory (no
temp files), plays overlapping voices and is disposed on window close,
before leaving the server. The SfxService interface and its callers
are unchanged; loudness matches the old mpv path (v^6). WAV only, so
no codec libraries are bundled and no build packages are needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PlayerControlsModel holds the controls' state and actions once; the
Standard skin (our own, no more media_kit controls or private-state
reach-ins) and Minimal (the former uosc design, made the app's own and
credited) only draw it. One layout spec for both: play first, then
previous/next, volume, time; subtitles, audio, settings, chat,
fullscreen last; everything else in the settings menu. Settings ->
Player -> Controls: time display, size, hide delay, optional buttons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every app streams its redacted diagnostic lines (server time, batched
every 10 s, gzip, buffered while offline) to POST /l/; the server merges
them with its own into session-YYYY-MM-DD.log in time order, tagged by
who. Opt-out in Settings > About; Mark a problem (Ctrl+Shift+B, the
player menus, About) writes a marker with an optional note. Copy
diagnostics can include the server's session log. Chat text never
reaches any log.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Logs: one redaction pass (query strings to names, member tokens,
passwords, cookies, auth headers) for every line; daily files with size
and age caps in the app (hosted server included) and the dedicated
server (--log-dir); swaps, relay channels, per-member /r /m /j outcomes,
server fetches, mpv load errors, yt-dlp runs. Settings > About: Copy
diagnostics, Open logs folder.
Bilibili through someone else: the viewer opened /r/ before the source
dialled in; the server holds that request and mpv gives up after 5 s
("could not be opened"). Viewers now open a member relay once it is
live, the putter starts its source before its own player, and track
sizes are read in parallel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server keeps one small relay (32 MiB ahead, 8 behind) for Up next's
first relayed item, keyed by its queue id at a URL that stays the same
after the swap: fetched by the server for server-fetch links, fed by
the adder's app for through-me links and files, by a member with an
account for member-passed Jellyfin items. Every app preloads from it;
the swap promotes it with its buffer. Dropped when the item stops
being first or its adder leaves. Measured switch: ~1.6 s cold, 20-40 ms
preloaded. ROADMAP gains the research item on server-side fetching of
member-resolved URLs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>