Fix download button not showing

Change description of "library.scan.title-match-min-ratio" config property
This commit is contained in:
grimsi
2025-05-22 12:48:25 +02:00
parent c68ecedd03
commit 5966f31c1e
3 changed files with 7 additions and 10 deletions
@@ -47,11 +47,8 @@ function LibraryManagementLayout({getConfig, formik}: any) {
<Section title="Scanning"/>
<ConfigFormField configElement={getConfig("library.scan.enable-filesystem-watcher")}/>
<ConfigFormField configElement={getConfig("library.scan.scan-empty-directories")}/>
<div className="flex flex-row gap-4">
<div className="flex flex-row gap-4 items-baseline">
<ConfigFormField configElement={getConfig("library.scan.title-match-min-ratio")}/>
<p className="text-foreground/80">
Minimum required Levenshtein ratio to consider two titles the same.
</p>
</div>
<ConfigFormField configElement={getConfig("library.scan.game-file-extensions")}/>
@@ -17,7 +17,7 @@ export default function GameView() {
const state = useSnapshot(gameState);
const game = gameId ? state.state[parseInt(gameId)] as GameDto : undefined;
const [downloadOptions, setDownloadOptions] = useState<Record<string, ComboButtonOption>>({});
const [downloadOptions, setDownloadOptions] = useState<Record<string, ComboButtonOption>>();
useEffect(() => {
DownloadProviderEndpoint.getProviders().then((providers) => {
@@ -66,10 +66,10 @@ export default function GameView() {
<p className="text-foreground/60">{game.release !== undefined ? new Date(game.release).getFullYear() : "unknown"}</p>
</div>
</div>
<ComboButton description={humanFileSize(game.fileSize)}
options={downloadOptions}
preferredOptionKey="preferred-download-method"
/>
{downloadOptions && <ComboButton description={humanFileSize(game.fileSize)}
options={downloadOptions}
preferredOptionKey="preferred-download-method"
/>}
</div>
<div className="flex flex-col gap-8">
<div className="flex flex-row gap-12">
@@ -39,7 +39,7 @@ sealed class ConfigProperties<T : Serializable>(
data object TitleMatchMinRatio : ConfigProperties<Int>(
Int::class,
"library.scan.title-match-min-ratio",
"Minimum ratio for title matching (0-100)",
"Minimum ratio for title matching (0-100). Higher values mean stricter matching.",
90
)