feat(external): per-host enable toggles in Settings (Phase 4d)
Operator lever: disable a single file host (e.g. mega.nz when it's banning) without touching the others. Five booleans on import_settings (extdl_<host>_enabled, default true — works out of the box, rule #26); the worker already reads them via getattr so no worker change. Migration 0050 + model fields + settings GET/PATCH (uniform boolean validation) + a 'External file-host downloads' card in the subscriptions Settings tab. Completes Phase 4. Refs FC #830. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,52 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<h3 class="text-h6 mb-3 mt-6">External file-host downloads</h3>
|
||||
<v-card variant="outlined">
|
||||
<v-card-text v-if="importStore.settings">
|
||||
<div class="fc-help mb-2">
|
||||
When a creator links files on these hosts in a post, Curator downloads
|
||||
them into the post automatically (tagged + provenance-linked like any
|
||||
other media). Turn a host off if it starts rate-limiting or banning.
|
||||
</div>
|
||||
<v-row>
|
||||
<v-col cols="12" sm="4">
|
||||
<v-switch
|
||||
v-model="dl.extdl_mega_enabled" label="mega.nz"
|
||||
density="compact" hide-details color="accent" @change="saveDownloader"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="4">
|
||||
<v-switch
|
||||
v-model="dl.extdl_gdrive_enabled" label="Google Drive"
|
||||
density="compact" hide-details color="accent" @change="saveDownloader"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="4">
|
||||
<v-switch
|
||||
v-model="dl.extdl_pixeldrain_enabled" label="Pixeldrain"
|
||||
density="compact" hide-details color="accent" @change="saveDownloader"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="4">
|
||||
<v-switch
|
||||
v-model="dl.extdl_mediafire_enabled" label="MediaFire"
|
||||
density="compact" hide-details color="accent" @change="saveDownloader"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="4">
|
||||
<v-switch
|
||||
v-model="dl.extdl_dropbox_enabled" label="Dropbox"
|
||||
density="compact" hide-details color="accent" @change="saveDownloader"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-text v-else>
|
||||
<v-skeleton-loader type="paragraph" />
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<h3 class="text-h6 mb-3 mt-6">Schedule defaults</h3>
|
||||
<v-card variant="outlined">
|
||||
<v-card-text v-if="importStore.settings">
|
||||
@@ -151,6 +197,11 @@ const dl = reactive({
|
||||
download_schedule_default_seconds: 28800,
|
||||
download_event_retention_days: 90,
|
||||
download_failure_warning_threshold: 5,
|
||||
extdl_mega_enabled: true,
|
||||
extdl_gdrive_enabled: true,
|
||||
extdl_mediafire_enabled: true,
|
||||
extdl_dropbox_enabled: true,
|
||||
extdl_pixeldrain_enabled: true,
|
||||
})
|
||||
|
||||
watch(() => importStore.settings, (s) => { if (s) Object.assign(dl, s) }, { immediate: true })
|
||||
|
||||
Reference in New Issue
Block a user