Skip to content

Commit

Permalink
Tagger config option to mark scene as organized (#4031)
Browse files Browse the repository at this point in the history
  • Loading branch information
plato178 authored Aug 24, 2023
1 parent 411ebb8 commit 3323477
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ui/v2.5/src/components/Tagger/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -52,6 +53,7 @@ export interface ITaggerConfig {
selectedEndpoint?: string;
fingerprintQueue: Record<string, string[]>;
excludedPerformerFields?: string[];
markSceneAsOrganizedOnSave?: boolean;
excludedStudioFields?: string[];
createParentStudios: boolean;
}
Expand Down
5 changes: 4 additions & 1 deletion ui/v2.5/src/components/Tagger/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ export const TaggerContext: React.FC = ({ children }) => {
try {
await updateScene({
variables: {
input: sceneCreateInput,
input: {
...sceneCreateInput,
organized: config?.markSceneAsOrganizedOnSave,
},
},
});

Expand Down
17 changes: 17 additions & 0 deletions ui/v2.5/src/components/Tagger/scenes/Config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions ui/v2.5/src/locales/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3323477

Please sign in to comment.