Repository navigation
After a restart, partial OBS and AGR takes and late OBS starts aren't marked Captured, and a Steam game no longer blocks Start (part of #20) - #1255
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.
Release note: Fixed: after DoD Studio closed during a capture batch, a clip the game or OBS didn't finish recording, or that OBS started late, is no longer marked Captured when Studio reopens, and a game started from Steam no longer holds up Start Capture Batch.
Part of #20 (closed; this fixes the three known risks #1171 and #1185 left, listed in their Decisions).
What changes
The catch-up after a restart (#545, #760, #1171) checks the takes of a batch that ran on after Studio closed. It could only tell a partial HLAE take (by its
sound.wav). Now, instudio/src-tauri/src/catch_up_takes.rs(new; the wav check moved there frombatch_catch_up.rs):-condebug, so the game copies each[dod-studio]marker intoqconsole.logbesidehl.exe, and only the end of a batch Studio watched clears it (Auto-clear Logs). The catch-up reads the log's last 64 MB, splits it into runs at eachDEMO_START 1 …, and takes the last run that is this batch's: the same number of demos, and everySTART_RECORDtick a clip start of the demo playing. ASTART_RECORDwith noSTOP_RECORDafter it is the clip the game was recording when it closed; it goes through the watched batch's ownmark_cut_short(A batch cancelled mid-clip still says the clip was captured #1081). This is the only sign an AGR take has. Checked on this PC's two installs: both logs hold the markers of hook-run batches (PRE 48 MB / 94 runs, POST 30 MB / 183 runs; the biggest run 5.8 MB).ObsSessionnow writesdodstudio_obs_take.jsoninto the block folder when a recording starts and removes it at the stop (native/src/obs/take_state.rs). The catch-up finds one still sayingrecordingand marks the take "still recording in OBS when DoD Studio closed" (newCutBy::StudioClosed, with Last Batch strings).started_late_msafter the stop whenObsSessionfound OBS started late (An OBS clip whose recording started after the clip's first frame still counts as captured #1109). The catch-up marks such a take started late, not captured, as a watched batch does.AfxHookGoldSrc.dllloaded (batch_reuse::may_be_capturing). Every batch records through HLAE, and a game left open for one (Start Capture Batch runs in the game that is already open instead of relaunching it (#725) #1075) was started through HLAE too, so a game started from Steam never is. A game whose DLLs can't be read still counts.Each marked take is left on disk, not counted, and logged in the activity log with its folder; the existing "Capture the rest?" offer then includes it.
take_meta::is_metadatalists the new file, so it never counts as captured output.Decisions
dodstudio_obs_take.jsoncounts it as part of the take, which is how it counted that take before (the take folder already heldtake0000\). The JSON tolerates unknown fields both ways.Test done
catch_up_takes(7: the clip with no stop is cut; a finished batch marks nothing; another batch's run, another demo count, no clip start, an empty log are ignored; the last matching run is read; no log; the tail read; OBS state recording/late/none),obs::take_state(2),obs::session(the late start is kept, a stop in time leaves no file),batch_reuse::may_be_capturing,take_meta::is_metadata,strings.test.js(studio_closed).rustup run 1.98.1 cargo fmt --all --check: clean. Clippy 1.98.1--workspace --all-targets --locked --exclude goldsrc-hooks -D warnings: clean (no hook code changed).cargo test --workspace --locked --exclude goldsrc-hooks --exclude web-analyzer: all pass (native 1262, desktop-studio 252).npm run test:unit: 1208 passed. Playwrightapp-boot.spec.js+batch-results.spec.js: 13 passed.qconsole.login hook-run batches) was checked read-only against the PRE and POST installs' existing logs.🤖 Generated with Claude Code