Add a cache for gallery thumbnails (#496)

This commit is contained in:
bnkai
2020-05-11 10:20:08 +03:00
committed by GitHub
parent 8ba76783b0
commit bd45daacf3
36 changed files with 319 additions and 1200 deletions

View File

@@ -16,6 +16,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
const [generatedPath, setGeneratedPath] = useState<string | undefined>(
undefined
);
const [cachePath, setCachePath] = useState<string | undefined>(undefined);
const [maxTranscodeSize, setMaxTranscodeSize] = useState<
GQL.StreamingResolutionEnum | undefined
>(undefined);
@@ -42,6 +43,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
stashes,
databasePath,
generatedPath,
cachePath,
maxTranscodeSize,
maxStreamingTranscodeSize,
forceMkv,
@@ -65,6 +67,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
setStashes(conf.general.stashes ?? []);
setDatabasePath(conf.general.databasePath);
setGeneratedPath(conf.general.generatedPath);
setCachePath(conf.general.cachePath);
setMaxTranscodeSize(conf.general.maxTranscodeSize ?? undefined);
setMaxStreamingTranscodeSize(
conf.general.maxStreamingTranscodeSize ?? undefined
@@ -213,6 +216,20 @@ export const SettingsConfigurationPanel: React.FC = () => {
</Form.Text>
</Form.Group>
<Form.Group id="cache-path">
<h6>Cache Path</h6>
<Form.Control
className="col col-sm-6 text-input"
defaultValue={cachePath}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setCachePath(e.currentTarget.value)
}
/>
<Form.Text className="text-muted">
Directory location of the cache
</Form.Text>
</Form.Group>
<Form.Group>
<h6>Excluded Patterns</h6>
<Form.Group>