Add oshash support (#667)

This commit is contained in:
WithoutPants
2020-08-06 11:21:14 +10:00
committed by GitHub
parent f59ad0ca2b
commit 5992ff8706
50 changed files with 1276 additions and 195 deletions

View File

@@ -9,6 +9,7 @@ import {
mutateMetadataScan,
mutateMetadataAutoTag,
mutateMetadataExport,
mutateMigrateHashNaming,
mutateStopJob,
} from "src/core/StashService";
import { useToast } from "src/hooks";
@@ -46,6 +47,8 @@ export const SettingsTasksPanel: React.FC = () => {
return "Importing from JSON";
case "Auto Tag":
return "Auto tagging scenes";
case "Migrate":
return "Migrating";
default:
return "Idle";
}
@@ -308,6 +311,28 @@ export const SettingsTasksPanel: React.FC = () => {
Import from exported JSON. This is a destructive action.
</Form.Text>
</Form.Group>
<hr />
<h5>Migrations</h5>
<Form.Group>
<Button
id="migrateHashNaming"
variant="danger"
onClick={() =>
mutateMigrateHashNaming().then(() => {
jobStatus.refetch();
})
}
>
Rename generated files
</Button>
<Form.Text className="text-muted">
Used after changing the Generated file naming hash to rename existing
generated files to the new hash format.
</Form.Text>
</Form.Group>
</>
);
};