Commit Graph
25 Commits
Author SHA1 Message Date
Scott GarrettandClaude Code f457b4e89c Make chapter tracks deletable, insertable, and language-editable
Delete: the phase-1 gate against deleting the chapter pseudo-track on
Matroska documents is obsolete now that chapter changes ride the
stream-copy remuxer — a removed pseudo-track simply makes the model
report "no chapters", which removes the Chapters element on save (the
same path emptying the Chapters tab already took). The toolbar Delete
button's validation is corrected too; it still rejected chapter-only
selections after deleteSelection was opened up.

Insert: the Actions toolbar gets a single "Insert a chapter" item, and
"Insert a chapter every" (previously MP4-only) is enabled on Matroska.
Both create the chapter track when the document has none, doing the
tags-only bookkeeping the model needs (dense display trackId,
updateChangeCount). A single insert lands 1s after the latest start,
clamped to the track duration, so it can never tie with a stored
chapter — ties get clamped +1ms on write and would silently shift the
user's own chapter times.

Language: the chapter row's language popup stays editable on MKV
documents (the value rides the remuxer's chapter rebuild, not the tag
writer, since the pseudo-track has no TrackEntry), and the Matroska
chapters snapshot carries it so a language-only edit triggers the
remux. Pairs with the submodule's ChapterLanguage round trip.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-26 18:17:37 -05:00
Scott GarrettandClaude Code eb386a52c3 Open and edit Matroska files in place, including track removal
.mkv/.mka/.mks now open directly into a tags-only document instead of
forcing the convert-import sheet:

- Metadata, cover art, and the four per-track fields Matroska stores
  (name, language, enabled, subtitle forced) save back into the same
  file via MP42MkvTagWriter; MP4-only properties stay read-only.
- Real tracks can be deleted and Save-As is enabled; both go through
  MP42MkvRemuxer's stream-copy rebuild (Document keeps an importer-order
  track snapshot and pairs TrackEntry elements by object identity).
  Destinations must stay .mkv/.mka/.mks.
- Info.plist: the Matroska document type becomes Editor so NSDocument
  offers .mkv Save-As instead of defaulting to the MP4 type.
- Delete on MKV docs skips organizeAlternateGroups/
  inferMediaCharacteristics because they reorder the model, which the
  TrackEntry pairing depends on; chapter rows stay undeletable.

Bumps MP42Foundation for the Matroska tagging/remux support.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-25 19:48:34 -05:00
Damiano Galassi b58346eda7 Improve selection restoration 2026-10-05 08:07:52 +02:00
Damiano Galassi 1040f0dab6 Switch to the appropriate view after an action 2026-10-03 17:52:22 +02:00
Damiano Galassi dfdffb9332 Better preserve the UI state after an undo 2026-10-03 17:20:42 +02:00
Damiano Galassi 934ae63b95 Expand undo/redo to all the document UI 2026-10-03 11:49:04 +02:00
Damiano Galassi 73e27ef56c Disable drag & drop for muxed tracks 2026-09-29 10:41:57 +02:00
Damiano Galassi 17c7d67b96 Use some modern APIs and fix warnings on the latest macOS SDK 2026-09-22 16:10:37 +02:00
Damiano Galassi ea9a72b28a Replace some deprecated methods with newer ones 2024-07-06 17:03:58 +02:00
Damiano Galassi fc6bc09ce2 Partially enable Swift concurrency checks 2024-06-27 11:57:20 +02:00
Damiano Galassi 9fc6de887e Enable more warnings. 2020-09-19 11:20:13 +02:00
Damiano Galassi ab52a8e0f6 Fix layout issues. 2020-08-06 09:31:25 +02:00
Damiano Galassi f993d8dd81 Mark some classes as final. 2019-03-05 10:41:54 +01:00
Damiano Galassi 3778909a69 Implement multiple tracks drag & drop in the document window. 2019-01-28 14:10:19 +01:00
Damiano Galassi 5b4600b9dd Convert to Swift 4.2 2018-06-07 11:30:39 +02:00
Damiano Galassi 983151aeeb Import MP42Foundation. 2018-05-02 13:06:16 +02:00
Damiano Galassi 6fd2bbdbf7 Reload the name cell after a track name has been set. 2018-03-23 12:45:12 +01:00
Damiano Galassi 15ebcff2bb Fix setTrackLanguage(:) to set the right lang for "und". 2018-02-27 15:50:29 +01:00
Damiano Galassi acae7568b4 Restore compatibility with 10.10 2018-02-23 08:43:04 +01:00
Damiano Galassi a17eb139ba Fix some leak and typo. 2018-02-22 13:26:39 +01:00
Damiano Galassi 854e5dfcc9 Move sendToQueue to Document.swift 2018-02-14 15:15:16 +01:00
Damiano Galassi 9c8c796598 Remember tracks table selection. 2018-02-14 09:45:55 +01:00
Damiano Galassi 0003ff73b3 Fix document window drag & drop. 2018-02-12 13:05:35 +01:00
Damiano Galassi 3cc367a00d Convert SBDocument to swift. 2018-02-10 14:53:39 +01:00
Damiano Galassi 94f5f85124 Refactor the document window controller and the prefs controller. Some regression still in there. 2018-02-08 17:50:39 +01:00