Repository navigation
Add complete stream saving and durable Continue playback - #1
Merged
Merged
Conversation
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.
Network playback loses cached packets as buffers are evicted or audio tracks change, and ordinary watch-later state can be lost when the player terminates abruptly. This adds a complete selected-stream export and a durable Continue action to the context menu.
Continue is the first root-menu item, including legacy custom menus while preserving existing key bindings. Playback checkpoints are written every second and after key playback changes using a flushed temporary file, atomic replacement, and a previous-version backup. Continue reopens the original source at the saved fractional position with playback/track, external-subtitle, video, and connection settings, independently of native watch-later resume. Failed connections, missing external tracks, imprecise seeks, and stale events from the previous stream cannot overwrite the recovery checkpoint. Healthy paused playback can continue without discarding its buffer.
File > Save Buffered Video... pins the video, selected audio, audio delay and connection settings before opening the Save dialog. Complete cached streams can be saved offline. Incomplete or untrustworthy streams are fetched from the beginning in an independent background player, including audio prefixes missing after a track switch. Sources shared by required streams are fetched together; a complete cached video can be combined with separately downloaded selected audio. This conservative completion may re-read more than the missing intervals. Native watch-later resume is disabled for downloads. Transient failures are retried up to three times, without changing foreground playback or later track selections.
Export combines selected video/audio without re-encoding, validates cached packet continuity and complete source reads, compares packet counts and durations for each selected stream before/after muxing, and decodes the result before replacing the destination. Decoder error logs are treated as failures even if FFmpeg exits zero; bad cached payloads are fetched again. Original source gaps and genuinely shorter audio tracks are preserved. Truncated downloads, cancellation, mux errors and failed verification leave an existing destination intact. Closing the window cancels an active export and waits for its cleanup. FFmpeg is included by the x64/ARM64 dependency-update and release scripts; the application does not require FFprobe. Network packet caching is enabled on disk by default with a configurable 512 MiB packet-metadata back-buffer budget, and network videos stay open at EOF.
Windows CI now builds a Release x64 portable artifact on pull requests and every push to main. It bundles the .NET 10 runtime, checksum-verified libmpv, MediaInfo, FFmpeg and the console launcher, compiles translations, and starts the packaged tools on a Windows runner before uploading a ready-to-run ZIP.
Validation:
git diff --checkpassed.Runtime limits: Windows GUI interaction and physical power loss still need manual testing; packaged tool startup is verified on the Windows CI runner. Tests use libmpv 0.37 and controlled local HTTP origins, not a live account with expiring credentials. A source must be accessible to supply missing data; the completion pass and full decode verification can take time and need intermediate disk space. Large native cache dumps can temporarily stall playback. Abrupt shutdown can lose playback progress after the last completed checkpoint (normally up to one second plus storage/system delay); precise Continue requires a reachable, seekable source and available external files. Recovery checkpoints contain source URLs and connection settings. Playback state survives restart, while the previous playback cache remains temporary. See the manual and the three test READMEs for reproduction.