Adds the SSD content checkbox to the library form

Adds the localized checkbox and description, and sends the selected value with the library save request.
This commit is contained in:
BinaryAlley committed 2026-10-30 22:39:57 +02:00
1 parent 47d79d88e5
commit 499647f7bb
12 files changed
+80

No files matched your search

@@ -205,6 +205,18 @@
</div>
<small class="form-label text-disabled form-description">@_localizer["DescriptionShouldSkipUnchangedDirectoriesDuringScan"]</small>
</div>
<div class="form-row">
<div class="form-label">
<label asp-for="IsContentOnSsd">@_localizer["IsContentOnSsd"]:</label>
</div>
<div class="form-field">
<label class="enlightenment-checkbox-label">
<input type="checkbox" asp-for="IsContentOnSsd" class="enlightenment-checkbox-hidden" />
<span class="enlightenment-checkbox"></span>
</label>
</div>
<small class="form-label text-disabled form-description">@_localizer["DescriptionIsContentOnSsd"]</small>
</div>
<div class="form-row">
<div class="form-label">
<label for="should-track-consumption-progress">@_localizer["ShouldTrackConsumptionProgress"]</label>:
@@ -343,6 +355,7 @@
const chkCanDownloadMetadataFromWeb = form.querySelector('[name="CanDownloadMetadataFromWeb"]');
const chkShouldSaveMetadataInMediaDirectories = form.querySelector('[name="ShouldSaveMetadataInMediaDirectories"]');
const chkShouldSkipUnchangedDirectoriesDuringScan = form.querySelector('[name="ShouldSkipUnchangedDirectoriesDuringScan"]');
const chkIsContentOnSsd = form.querySelector('[name="IsContentOnSsd"]');
const chkShouldTrackConsumptionProgress = form.querySelector('[name="ShouldTrackConsumptionProgress"]');
const inputCompletionThresholdPercentage = form.querySelector('[name="CompletionThresholdPercentage"]');
const completionThresholdValidation = document.getElementById('completion-threshold-validation');
@@ -376,6 +389,7 @@
CanDownloadMetadataFromWeb: chkCanDownloadMetadataFromWeb.checked,
ShouldSaveMetadataInMediaDirectories: chkShouldSaveMetadataInMediaDirectories.checked,
ShouldSkipUnchangedDirectoriesDuringScan: chkShouldSkipUnchangedDirectoriesDuringScan.checked,
IsContentOnSsd: chkIsContentOnSsd.checked,
ShouldTrackConsumptionProgress: shouldTrackConsumptionProgress,
// An empty threshold is sent as null: creating a library or enabling progress tracking uses the type default,
// editing a library that already tracks progress keeps the stored threshold, and types without a default