mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-31 06:40:50 +01:00
61 lines
1.8 KiB
Markdown
61 lines
1.8 KiB
Markdown
# Link Sync Settings
|
|
|
|
**Status: Planning**
|
|
|
|
## Summary
|
|
|
|
When a user enables quality profile sync, require media management sync to also be
|
|
enabled. This ensures users get the complete configuration — profiles alone without
|
|
proper naming formats leads to inconsistent results.
|
|
|
|
## Problem
|
|
|
|
Users can currently enable quality profile sync without enabling media management
|
|
sync. This creates issues:
|
|
|
|
- Quality profiles define *what* quality to grab
|
|
- Media management defines *how* files are named and organized
|
|
- Without both, the naming format may not match what the profile expects
|
|
- Leads to confusion and support requests
|
|
|
|
## Solution
|
|
|
|
Client-side validation on the sync settings page. Don't let users save if:
|
|
|
|
1. Any quality profiles are selected for sync, AND
|
|
2. Media management settings (naming, quality definitions) are not configured
|
|
|
|
## Implementation
|
|
|
|
**Location:** `src/routes/arr/[id]/sync/+page.svelte`
|
|
|
|
**Logic:**
|
|
|
|
```typescript
|
|
// Check if any quality profiles are selected
|
|
const hasQualityProfilesSelected = Object.values(qualityProfileState)
|
|
.some(db => Object.values(db).some(selected => selected));
|
|
|
|
// Check if media management is configured
|
|
const hasMediaManagement =
|
|
mediaManagementState.namingDatabaseId !== null ||
|
|
mediaManagementState.qualityDefinitionsDatabaseId !== null;
|
|
|
|
// Validation
|
|
const canSave = !hasQualityProfilesSelected || hasMediaManagement;
|
|
```
|
|
|
|
**UX:**
|
|
|
|
- Show warning message when quality profiles selected but no media management
|
|
- Disable save buttons on QualityProfiles component until valid
|
|
- Message: "Quality profiles require media management settings. Please configure
|
|
naming or quality definitions to ensure consistent file naming."
|
|
|
|
## Checklist
|
|
|
|
- [ ] Add validation logic to `+page.svelte`
|
|
- [ ] Pass `canSave` state to `QualityProfiles.svelte`
|
|
- [ ] Show warning alert when invalid
|
|
- [ ] Disable save button when invalid
|