diff --git a/package.json b/package.json index 3d4c6f5..8475c2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mira-ui", - "version": "2.0.2", + "version": "2.1.0", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.component.ts b/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.component.ts index 4df8e4b..9d51328 100644 --- a/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.component.ts +++ b/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.component.ts @@ -43,6 +43,8 @@ export class ActionEditorComponent implements OnInit, AfterViewInit { @Input() editMode = false; + allowZoom = false; + selectedActionId: string; selectedNodeIndex: number = -1; selectedLinkId: string; @@ -58,6 +60,8 @@ export class ActionEditorComponent implements OnInit, AfterViewInit { [ActionType.Extract]: 'envelope outline open' } + readonly extractorIdList: string[] = ['Default', 'File', 'Subtitle', 'Audio']; + linkMode = LinkMode.None; @ViewChild('actionEditorContainer') actionEditorContainer: ElementRef; @@ -69,6 +73,9 @@ export class ActionEditorComponent implements OnInit, AfterViewInit { } ngOnInit(): void { + if (this.editMode) { + this.allowZoom = true; + } if (this.actions) { this.edges = []; this.nodes = Object.keys(this.actions).map(actionId => { @@ -226,6 +233,11 @@ export class ActionEditorComponent implements OnInit, AfterViewInit { } } + updateActionExtractorId(extractorId: string): void { + (this.actions[this.selectedActionId] as ExtractAction).extractorId = extractorId; + this.updateNode(); + } + updateActionProfile(profile: string): void { (this.actions[this.selectedActionId] as ConvertAction).profile = profile; this.updateNode(); diff --git a/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.html b/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.html index a93a2bb..5b78b81 100644 --- a/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.html +++ b/src/app/admin/bangumi-detail/video-processs-rule/action-editor/action-editor.html @@ -13,7 +13,7 @@ - + {{node.label}} @@ -21,17 +21,24 @@ profileExtraData:{{node.data.profileExtraData}} - extractFrom:{{node.data.extractFrom}} - extractTarget:{{node.data.extractTarget}} - outputExtname:{{node.data.outputExtname}} - extractRegex:{{node.data.extractRegex}} + extractorId:{{node.data.extractorId}} + extractFrom:{{node.data.extractFrom}} + extractTarget:{{node.data.extractTarget}} + outputExtname:{{node.data.outputExtname}} + extractRegex:{{node.data.extractRegex}} + + extraData.propertyName:{{node.data.extraData.propertyName}} + + extraData.propertyValueRegex:{{node.data.extraData.propertyValueRegex}} + + extraData.selectDefault:{{node.data.extraData.selectDefault}} - Action: {{nodes[selectedNodeIndex].label}}
+ + +
+
-
+
-
+
Action: {{nodes[selectedNodeIndex].label}} name="extractRegex" placeholder="regex to match file/track"/>
+
+ + +
+
+ + +
+
+ + +
diff --git a/src/app/admin/video-process-job-detail/vertex-graph/vertex-graph.html b/src/app/admin/video-process-job-detail/vertex-graph/vertex-graph.html index 9b65c3b..319fff8 100644 --- a/src/app/admin/video-process-job-detail/vertex-graph/vertex-graph.html +++ b/src/app/admin/video-process-job-detail/vertex-graph/vertex-graph.html @@ -38,10 +38,16 @@ profileExtraData:{{node.data.action.profileExtraData}} - extractFrom:{{node.data.action.extractFrom}} - extractTarget:{{node.data.action.extractTarget}} - outputExtname:{{node.data.action.outputExtname}} - extractRegex:{{node.data.action.extractRegex}} + extractFrom:{{node.data.action.extractFrom}} + extractTarget:{{node.data.action.extractTarget}} + outputExtname:{{node.data.action.outputExtname}} + extractRegex:{{node.data.action.extractRegex}} + + extraData.propertyName:{{node.data.action.extraData.propertyName}} + + extraData.propertyValueRegex:{{node.data.action.extraData.propertyValueRegex}} + + extraData.selectDefault:{{node.data.action.extraData.selectDefault}} diff --git a/src/app/entity/ExtractAction.ts b/src/app/entity/ExtractAction.ts index 7bdf245..ca29d3f 100644 --- a/src/app/entity/ExtractAction.ts +++ b/src/app/entity/ExtractAction.ts @@ -18,4 +18,5 @@ export class ExtractAction extends Action { public outputExtname: string; public extractRegex: string; public extractorId = 'Default'; + public extraData: any = {}; }