mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Generate content for specific scenes (#672)
* Add UI dialog for scene(s) * Move preview preset to config
This commit is contained in:
@@ -17,6 +17,9 @@ export const SettingsConfigurationPanel: React.FC = () => {
|
||||
undefined
|
||||
);
|
||||
const [cachePath, setCachePath] = useState<string | undefined>(undefined);
|
||||
const [previewPreset, setPreviewPreset] = useState<string>(
|
||||
GQL.PreviewPreset.Slow
|
||||
);
|
||||
const [maxTranscodeSize, setMaxTranscodeSize] = useState<
|
||||
GQL.StreamingResolutionEnum | undefined
|
||||
>(undefined);
|
||||
@@ -44,6 +47,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
|
||||
databasePath,
|
||||
generatedPath,
|
||||
cachePath,
|
||||
previewPreset: (previewPreset as GQL.PreviewPreset) ?? undefined,
|
||||
maxTranscodeSize,
|
||||
maxStreamingTranscodeSize,
|
||||
forceMkv,
|
||||
@@ -68,6 +72,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
|
||||
setDatabasePath(conf.general.databasePath);
|
||||
setGeneratedPath(conf.general.generatedPath);
|
||||
setCachePath(conf.general.cachePath);
|
||||
setPreviewPreset(conf.general.previewPreset);
|
||||
setMaxTranscodeSize(conf.general.maxTranscodeSize ?? undefined);
|
||||
setMaxStreamingTranscodeSize(
|
||||
conf.general.maxStreamingTranscodeSize ?? undefined
|
||||
@@ -274,10 +279,32 @@ export const SettingsConfigurationPanel: React.FC = () => {
|
||||
|
||||
<Form.Group>
|
||||
<h4>Video</h4>
|
||||
<Form.Group id="transcode-size">
|
||||
<h6>Preview encoding preset</h6>
|
||||
<Form.Control
|
||||
className="w-auto input-control"
|
||||
as="select"
|
||||
value={previewPreset}
|
||||
onChange={(e: React.ChangeEvent<HTMLSelectElement>) =>
|
||||
setPreviewPreset(e.currentTarget.value)
|
||||
}
|
||||
>
|
||||
{Object.keys(GQL.PreviewPreset).map((p) => (
|
||||
<option value={p.toLowerCase()} key={p}>
|
||||
{p}
|
||||
</option>
|
||||
))}
|
||||
</Form.Control>
|
||||
<Form.Text className="text-muted">
|
||||
The preset regulates size, quality and encoding time of preview
|
||||
generation. Presets beyond “slow” have diminishing returns and are
|
||||
not recommended.
|
||||
</Form.Text>
|
||||
</Form.Group>
|
||||
<Form.Group id="transcode-size">
|
||||
<h6>Maximum transcode size</h6>
|
||||
<Form.Control
|
||||
className="col col-sm-6 input-control"
|
||||
className="w-auto input-control"
|
||||
as="select"
|
||||
onChange={(event: React.ChangeEvent<HTMLSelectElement>) =>
|
||||
setMaxTranscodeSize(translateQuality(event.currentTarget.value))
|
||||
@@ -297,7 +324,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
|
||||
<Form.Group id="streaming-transcode-size">
|
||||
<h6>Maximum streaming transcode size</h6>
|
||||
<Form.Control
|
||||
className="col col-sm-6 input-control"
|
||||
className="w-auto input-control"
|
||||
as="select"
|
||||
onChange={(event: React.ChangeEvent<HTMLSelectElement>) =>
|
||||
setMaxStreamingTranscodeSize(
|
||||
|
||||
Reference in New Issue
Block a user