Tagger config option to mark scene as organized (#4031)

This commit is contained in:
plato178 2023-08-24 01:48:35 +01:00 committed by GitHub
parent 411ebb8195
commit 332347737a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 1 deletions

View file

@ -36,6 +36,7 @@ export const initialConfig: ITaggerConfig = {
tagOperation: "merge",
fingerprintQueue: {},
excludedPerformerFields: DEFAULT_EXCLUDED_PERFORMER_FIELDS,
markSceneAsOrganizedOnSave: false,
excludedStudioFields: DEFAULT_EXCLUDED_STUDIO_FIELDS,
createParentStudios: true,
};
@ -52,6 +53,7 @@ export interface ITaggerConfig {
selectedEndpoint?: string;
fingerprintQueue: Record<string, string[]>;
excludedPerformerFields?: string[];
markSceneAsOrganizedOnSave?: boolean;
excludedStudioFields?: string[];
createParentStudios: boolean;
}

View file

@ -461,7 +461,10 @@ export const TaggerContext: React.FC = ({ children }) => {
try {
await updateScene({
variables: {
input: sceneCreateInput,
input: {
...sceneCreateInput,
organized: config?.markSceneAsOrganizedOnSave,
},
},
});

View file

@ -176,6 +176,23 @@ const Config: React.FC<IConfigProps> = ({ show }) => {
})}
</Form.Text>
</Form.Group>
<Form.Group controlId="toggle-organized">
<Form.Check
label={
<FormattedMessage id="component_tagger.config.mark_organized_label" />
}
checked={config.markSceneAsOrganizedOnSave}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setConfig({
...config,
markSceneAsOrganizedOnSave: e.currentTarget.checked,
})
}
/>
<Form.Text>
<FormattedMessage id="component_tagger.config.mark_organized_desc" />
</Form.Text>
</Form.Group>
</Form>
<div className="col-md-6">
<h5>

View file

@ -156,6 +156,8 @@
"active_instance": "Active stash-box instance:",
"blacklist_desc": "Blacklist items are excluded from queries. Note that they are regular expressions and also case-insensitive. Certain characters must be escaped with a backslash: {chars_require_escape}",
"blacklist_label": "Blacklist",
"mark_organized_desc": "Immediately mark the scene as Organized after the Save button is clicked.",
"mark_organized_label": "Mark as Organized on save",
"query_mode_auto": "Auto",
"query_mode_auto_desc": "Uses metadata if present, or filename",
"query_mode_dir": "Dir",