feat: bring the ripping and tagging tools into the repo #5
Loading…
Reference in a new issue
No description provided.
Delete branch "tools/ripping-and-tagging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Moves the two remaining tools out of scratch and into the repo, and adds the
verification that would have caught this week's worst failure.
feat: add rip_disc, which verifies it ripped the title it asked formakemkvcon mkvdoes not always enumerate the same titles asmakemkvcon info. With identical flags on one disc,infooffered 29 titles andmkvoffered 26 — it silently dropped the episode's two playlists because their first
sector was unreadable. Every index then referred to a different title, one or
more positions along.
Twenty titles were ripped that way. Every completion message reported success,
every output file existed and was non-empty, and not one was the title
requested — four were duplicates of each other and the episode was absent
entirely. The existing checks (did it save something; does the file exist) were
both satisfied by all twenty, which is exactly why the failure was invisible.
The check that catches it is comparing each output's duration against the
duration the scan recorded for that title. Replayed against the real logs it
aborts on title #1:
It does not false-positive: a title that genuinely matched passes at 236s vs 236s.
Treat a divergence as a reason to stop rather than an off-by-one to correct —
the dropped titles need not be contiguous.
feat: add tag_episode for naming and flagging an episode's tracksThe operator supplies the judgement calls — episode title, who speaks on each
commentary. Everything mechanical is measured, because track position has
been wrong in every way it can be:
end on a foreign dub; some carry two, and Hardhome carries three.
language immediately before — since one file can hold an English TrueHD/AC-3
pair and a Russian DTS-HD MA/DTS pair.
Absolute thresholds break both ways: full tracks run 380–1500 cues depending
on runtime, and a forced track can span nearly a whole episode on four cues.
mkvpropeditchangesonly what it is told and a re-run otherwise leaves stale flags under corrected
names.
Cue counts are cached beside the media file rather than beside the script:
title numbers restart at
t00on every disc, so any coarser key collides acrossdiscs of one set and serves another disc's data.
Verification
AGENTS.mdgate: syntax clean,--helppasses on both new scripts. Then againstreal media:
rip_disc.pyreplayed on the failing disc's logs — aborts on title 1 with thediagnostic above; passes the title that genuinely matched
tag_episode.py— byte-identical output to the scratch version on a known file(S01E01: same track names, same commentary, same flags)
Both were generalised on the way in:
rip_disc.pytakes a destination directoryand honours
$MAKEMKVCON;tag_episode.pytakes--series. Neither carries ahardcoded path any more.
Still failing on
main:pickthumb.py,probe_mkv.pyandscan_titles.pyexit non-zero from
--help, so the repo does not pass its own documented gate.Untouched here — worth a separate PR.