diff --git a/README.md b/README.md index 2754c18..255f3c3 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ OPTIONS: --exclude-exclusive-roles Exclude markers that have specified role type but only if the opposite role type is absent. - --label + --label Label to overlay on thumb images. This argument can be supplied more than once to apply multiple labels. --label-copyright diff --git a/Sources/MarkersExtractor/Export/ExportField.swift b/Sources/MarkersExtractor/Export/ExportField.swift index 61805f1..5ab842e 100644 --- a/Sources/MarkersExtractor/Export/ExportField.swift +++ b/Sources/MarkersExtractor/Export/ExportField.swift @@ -17,7 +17,6 @@ public enum ExportField: String, CaseIterable, RawRepresentable, Hashable { case position case clipType case clipName - case clipFilename case clipDuration case videoRole case audioRole @@ -41,7 +40,6 @@ extension ExportField { case .position: return "Marker Position" case .clipType: return "Clip Type" case .clipName: return "Clip Name" - case .clipFilename: return "Clip Filename" case .clipDuration: return "Clip Duration" case .videoRole: return "Video Role & Subrole" case .audioRole: return "Audio Role & Subrole" diff --git a/Sources/MarkersExtractor/Export/Profile/Airtable/AirtableExportProfile Export.swift b/Sources/MarkersExtractor/Export/Profile/Airtable/AirtableExportProfile Export.swift index ed64110..aa688af 100644 --- a/Sources/MarkersExtractor/Export/Profile/Airtable/AirtableExportProfile Export.swift +++ b/Sources/MarkersExtractor/Export/Profile/Airtable/AirtableExportProfile Export.swift @@ -70,7 +70,6 @@ extension AirtableExportProfile { .position: marker.position, .clipType: marker.clipType, .clipName: marker.clipName, - .clipFilename: marker.clipFilename, .clipDuration: marker.clipDuration, .videoRole: marker.videoRole, .audioRole: marker.audioRole, diff --git a/Sources/MarkersExtractor/Export/Profile/Notion/NotionExportProfile Export.swift b/Sources/MarkersExtractor/Export/Profile/Notion/NotionExportProfile Export.swift index 62b4cd4..7134117 100644 --- a/Sources/MarkersExtractor/Export/Profile/Notion/NotionExportProfile Export.swift +++ b/Sources/MarkersExtractor/Export/Profile/Notion/NotionExportProfile Export.swift @@ -55,7 +55,6 @@ extension NotionExportProfile { .position: marker.position, .clipType: marker.clipType, .clipName: marker.clipName, - .clipFilename: marker.clipFilename, .clipDuration: marker.clipDuration, .videoRole: marker.videoRole, .audioRole: marker.audioRole, diff --git a/Sources/MarkersExtractor/Export/Support/StandardExportMarker.swift b/Sources/MarkersExtractor/Export/Support/StandardExportMarker.swift index 4e68e79..c77b2da 100644 --- a/Sources/MarkersExtractor/Export/Support/StandardExportMarker.swift +++ b/Sources/MarkersExtractor/Export/Support/StandardExportMarker.swift @@ -22,7 +22,6 @@ public struct StandardExportMarker: ExportMarker { public let position: String public let clipType: String public let clipName: String - public let clipFilename: String public let clipDuration: String public let audioRole: String public let videoRole: String @@ -49,7 +48,6 @@ public struct StandardExportMarker: ExportMarker { position = marker.positionTimecodeString(format: tcStringFormat) clipType = marker.parentInfo.clipType clipName = marker.parentInfo.clipName - clipFilename = marker.parentInfo.clipFilename clipDuration = marker.parentInfo.clipDurationTimecodeString(format: tcStringFormat) videoRole = marker.roles.videoFormatted() audioRole = marker.roles.audioFormatted() diff --git a/Sources/MarkersExtractor/Extractors/FCPXMLMarkerExtractor.swift b/Sources/MarkersExtractor/Extractors/FCPXMLMarkerExtractor.swift index 70c9228..38ed209 100644 --- a/Sources/MarkersExtractor/Extractors/FCPXMLMarkerExtractor.swift +++ b/Sources/MarkersExtractor/Extractors/FCPXMLMarkerExtractor.swift @@ -211,7 +211,6 @@ class FCPXMLMarkerExtractor: NSObject, ProgressReporting { parentInfo: Marker.ParentInfo( clipType: extractedMarker.context[.parentType]?.name ?? "", clipName: extractedMarker.context[.parentName] ?? "", - clipFilename: extractedMarker.context[.mediaFilename] ?? "", clipInTime: clipInTime, clipOutTime: clipOutTime, eventName: extractedMarker.context[.ancestorEventName] ?? "", diff --git a/Sources/MarkersExtractor/Import/Marker/Marker.swift b/Sources/MarkersExtractor/Import/Marker/Marker.swift index 22f8c32..1431e38 100644 --- a/Sources/MarkersExtractor/Import/Marker/Marker.swift +++ b/Sources/MarkersExtractor/Import/Marker/Marker.swift @@ -16,7 +16,6 @@ public struct Marker: Equatable, Hashable, Sendable { struct ParentInfo: Equatable, Hashable { var clipType: String var clipName: String - var clipFilename: String var clipInTime: Timecode var clipOutTime: Timecode var eventName: String diff --git a/Sources/MarkersExtractor/MarkersExtractor Metadata.swift b/Sources/MarkersExtractor/MarkersExtractor Metadata.swift index 02df974..298c662 100644 --- a/Sources/MarkersExtractor/MarkersExtractor Metadata.swift +++ b/Sources/MarkersExtractor/MarkersExtractor Metadata.swift @@ -51,7 +51,12 @@ extension MarkersExtractor { } dict[.resource] = tools.resource - dict[.mediaFilename] = tools.mediaURL?.lastPathComponent + + // we're not using this, as it's not consistent. + // basic clips like asset clips only have one media file used, + // but sync clips, multicam, and compount clips (ref-clip) can + // have multiple clips with multiple media files so it would be ambiguous. + // dict[.mediaFilename] = tools.mediaURL?.lastPathComponent return dict } @@ -64,7 +69,6 @@ extension FinalCutPro.FCPXML.ContextKey { fileprivate enum Key: String { case ancestors case resource - case mediaFilename } /// Types of the element's ancestors. @@ -76,8 +80,4 @@ extension FinalCutPro.FCPXML.ContextKey { public static var resource: FinalCutPro.FCPXML.ContextKey { .init(key: Key.resource) } - - public static var mediaFilename: FinalCutPro.FCPXML.ContextKey { - .init(key: Key.mediaFilename) - } } diff --git a/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift b/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift index de3c0b2..c9751e4 100644 --- a/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift +++ b/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift @@ -28,7 +28,7 @@ final class BasicMarkersOutOfClipBoundsTests: XCTestCase { let clip1ParentInfo = Marker.ParentInfo( clipType: FinalCutPro.FCPXML.ClipType.assetClip.name, clipName: "Marker Test", - clipFilename: "Marker Test.m4v", + // clipFilename: "Marker Test.m4v", clipInTime: tc("00:00:00:00", at: fr), clipOutTime: tc("00:00:20:20", at: fr), eventName: "Test Event", @@ -40,7 +40,7 @@ final class BasicMarkersOutOfClipBoundsTests: XCTestCase { let clip2ParentInfo = Marker.ParentInfo( clipType: FinalCutPro.FCPXML.ClipType.assetClip.name, clipName: "Marker Test", - clipFilename: "Marker Test.m4v", + // clipFilename: "Marker Test.m4v", clipInTime: tc("00:00:20:20", at: fr), clipOutTime: tc("00:00:41:15", at: fr), eventName: "Test Event", diff --git a/Tests/MarkersExtractorTests/BasicMarkersTests.swift b/Tests/MarkersExtractorTests/BasicMarkersTests.swift index 56e00bd..db22032 100644 --- a/Tests/MarkersExtractorTests/BasicMarkersTests.swift +++ b/Tests/MarkersExtractorTests/BasicMarkersTests.swift @@ -34,7 +34,6 @@ final class BasicMarkersTests: XCTestCase { let parentInfo = Marker.ParentInfo( clipType: FinalCutPro.FCPXML.ClipType.title.name, clipName: "Basic Title", - clipFilename: "", clipInTime: tc("00:00:00:00", at: fr), clipOutTime: tc("00:01:03:29", at: fr), eventName: "Test Event", diff --git a/Tests/MarkersExtractorTests/MarkersExtractorTests.swift b/Tests/MarkersExtractorTests/MarkersExtractorTests.swift index 26a1bfa..bc89fd9 100644 --- a/Tests/MarkersExtractorTests/MarkersExtractorTests.swift +++ b/Tests/MarkersExtractorTests/MarkersExtractorTests.swift @@ -29,7 +29,6 @@ final class MarkersExtractorTests: XCTestCase { parentInfo: .init( clipType: FinalCutPro.FCPXML.ClipType.video.name, clipName: "Some Clip", - clipFilename: "", clipInTime: tc("00:00:00:00", at: .fps24), clipOutTime: tc("01:00:00:00", at: .fps24), eventName: "Some Event", @@ -85,7 +84,6 @@ final class MarkersExtractorTests: XCTestCase { parentInfo: .init( clipType: FinalCutPro.FCPXML.ClipType.video.name, clipName: "Some Clip", - clipFilename: "", clipInTime: tc("00:00:00:00", at: .fps24), clipOutTime: tc("01:00:00:00", at: .fps24), eventName: "Some Event",