Skip to content

Commit

Permalink
Removed Clip Filename manifest field (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Nov 23, 2023
1 parent b361c40 commit c1e90f4
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ OPTIONS:
--exclude-exclusive-roles <video, audio>
Exclude markers that have specified role type but
only if the opposite role type is absent.
--label <id, name, type, checked, status, notes, position, clipName, clipFilename, clipDuration, videoRole, audioRole, eventName, projectName, libraryName, iconImage, imageFileName>
--label <id, name, type, checked, status, notes, position, clipName, clipDuration, videoRole, audioRole, eventName, projectName, libraryName, iconImage, imageFileName>
Label to overlay on thumb images. This argument can
be supplied more than once to apply multiple labels.
--label-copyright <text>
Expand Down
2 changes: 0 additions & 2 deletions Sources/MarkersExtractor/Export/ExportField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] ?? "",
Expand Down
1 change: 0 additions & 1 deletion Sources/MarkersExtractor/Import/Marker/Marker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Sources/MarkersExtractor/MarkersExtractor Metadata.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -64,7 +69,6 @@ extension FinalCutPro.FCPXML.ContextKey {
fileprivate enum Key: String {
case ancestors
case resource
case mediaFilename
}

/// Types of the element's ancestors.
Expand All @@ -76,8 +80,4 @@ extension FinalCutPro.FCPXML.ContextKey {
public static var resource: FinalCutPro.FCPXML.ContextKey<FinalCutPro.FCPXML.AnyResource> {
.init(key: Key.resource)
}

public static var mediaFilename: FinalCutPro.FCPXML.ContextKey<String> {
.init(key: Key.mediaFilename)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
1 change: 0 additions & 1 deletion Tests/MarkersExtractorTests/BasicMarkersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions Tests/MarkersExtractorTests/MarkersExtractorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit c1e90f4

Please sign in to comment.