Retag queued Matroska files in place instead of converting to MP4
The queue now mirrors the document window for .mkv/.mka/.mks sources. The window's whole save branching (importer-order track snapshot, chapter row snapshot, staleness guard, tag-writer-vs-remuxer choice) moved out of Document into a shared MatroskaSaver used by both Document and QueueItem so the two paths cannot drift. Queue items import tags-only, keep the Matroska extension (in place, or stream-copy into a destination folder), MP4-only actions no-op on them, and send-to-queue hands the item the document's model plus its identity pairing baseline via attachMatroskaSaver. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
a1da1c8106
commit
80ca3970ec
7 files changed
+442
-195
No files matched your search
@@ -476,8 +476,19 @@ class SBSendToQueueScriptCommand: NSScriptCommand, ScriptCommandDocumentTargetin
|
||||
options[MP4264BitData] = Prefs.mp464bitOffset
|
||||
options[MP4264BitTime] = Prefs.mp464bitTimes
|
||||
|
||||
// Create queue item and add to queue
|
||||
let item = QueueItem(mp4: sublerDoc.mp4, destURL: destinationURL, attributes: options, optimize: Prefs.mp4SaveAsOptimize)
|
||||
// Create queue item and add to queue. A Matroska document keeps its
|
||||
// own file as the item's source and hands over the Matroska baseline
|
||||
// (pairing is by object identity): the item then writes back into
|
||||
// the container — the destination must stay mkv/mka/mks, checked at
|
||||
// save time — instead of muxing QuickTime atoms over a tags-only
|
||||
// model.
|
||||
let item: QueueItem
|
||||
if sublerDoc.isMatroska, let sourceURL = sublerDoc.fileURL, let saver = sublerDoc.mkvSaver {
|
||||
item = QueueItem(mp4: sublerDoc.mp4, fileURL: sourceURL, destURL: destinationURL, attributes: options, optimize: Prefs.mp4SaveAsOptimize)
|
||||
item.attachMatroskaSaver(saver)
|
||||
} else {
|
||||
item = QueueItem(mp4: sublerDoc.mp4, destURL: destinationURL, attributes: options, optimize: Prefs.mp4SaveAsOptimize)
|
||||
}
|
||||
|
||||
// Add the queue item
|
||||
QueueController.shared.add(item)
|
||||
|
||||
Reference in new issue
Block a user