feat: better langauge processing for profiles

This commit is contained in:
Sam Chau
2025-11-03 03:02:41 +10:30
parent 73cef97124
commit 63a75fcda2
2 changed files with 16 additions and 3 deletions
+4
View File
@@ -19,3 +19,7 @@ All schema changes will be documented in this file.
universal
- quality_profile_custom_formats.arr_type: scores can differ between Radarr
and Sonarr
## 3-11-25
- Better profile langauge procesing
+12 -3
View File
@@ -71,10 +71,8 @@ CREATE TABLE quality_profiles (
minimum_custom_format_score INTEGER NOT NULL DEFAULT 0,
upgrade_until_score INTEGER NOT NULL DEFAULT 0,
upgrade_score_increment INTEGER NOT NULL DEFAULT 1 CHECK (upgrade_score_increment > 0),
language_id INTEGER NOT NULL,
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (language_id) REFERENCES languages(id)
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- Conditions define the matching logic for custom formats
@@ -123,6 +121,17 @@ CREATE TABLE quality_profile_tags (
FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
);
-- Link quality profiles to languages with type modifiers
-- Type can be: 'must', 'only', 'not', or 'simple' (default language preference)
CREATE TABLE quality_profile_languages (
quality_profile_id INTEGER NOT NULL,
language_id INTEGER NOT NULL,
type VARCHAR(20) NOT NULL DEFAULT 'simple', -- 'must', 'only', 'not', 'simple'
PRIMARY KEY (quality_profile_id, language_id),
FOREIGN KEY (quality_profile_id) REFERENCES quality_profiles(id) ON DELETE CASCADE,
FOREIGN KEY (language_id) REFERENCES languages(id) ON DELETE CASCADE
);
-- Define which qualities belong to which quality groups
-- All qualities in a group are treated as equivalent
CREATE TABLE quality_group_members (