diff --git a/src/lib/shared/conditionTypes.ts b/src/lib/shared/conditionTypes.ts index c0f7426..6584b6f 100644 --- a/src/lib/shared/conditionTypes.ts +++ b/src/lib/shared/conditionTypes.ts @@ -30,7 +30,7 @@ export const SOURCE_VALUES = [ { value: 'unknown', label: 'Unknown', arrType: 'all' as ArrType }, { value: 'television', label: 'Television', arrType: 'all' as ArrType }, { value: 'television_raw', label: 'Television Raw', arrType: 'sonarr' as ArrType }, - { value: 'webdl', label: 'WEB-DL', arrType: 'all' as ArrType }, + { value: 'web_dl', label: 'WEB-DL', arrType: 'all' as ArrType }, { value: 'webrip', label: 'WEBRip', arrType: 'all' as ArrType }, { value: 'dvd', label: 'DVD', arrType: 'all' as ArrType }, { value: 'bluray', label: 'Bluray', arrType: 'all' as ArrType }, diff --git a/src/routes/custom-formats/[databaseId]/[id]/conditions/components/ConditionCard.svelte b/src/routes/custom-formats/[databaseId]/[id]/conditions/components/ConditionCard.svelte index 8ccb5e9..2992488 100644 --- a/src/routes/custom-formats/[databaseId]/[id]/conditions/components/ConditionCard.svelte +++ b/src/routes/custom-formats/[databaseId]/[id]/conditions/components/ConditionCard.svelte @@ -52,26 +52,24 @@ return 'all'; // Default to 'all' if neither is checked } - // Filter condition types based on arrType - $: filteredConditionTypes = CONDITION_TYPES.filter( - (t) => t.arrType === 'all' || t.arrType === arrType - ); + // All condition types (no arrType filtering) + $: filteredConditionTypes = [...CONDITION_TYPES]; - // Get value options based on current type + // Get value options based on current type (no arrType filtering - show all options) $: valueOptions = getValueOptions(condition.type); function getValueOptions(type: string) { switch (type) { case 'source': - return SOURCE_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...SOURCE_VALUES]; case 'resolution': - return RESOLUTION_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...RESOLUTION_VALUES]; case 'quality_modifier': - return QUALITY_MODIFIER_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...QUALITY_MODIFIER_VALUES]; case 'release_type': - return RELEASE_TYPE_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...RELEASE_TYPE_VALUES]; case 'indexer_flag': - return INDEXER_FLAG_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...INDEXER_FLAG_VALUES]; default: return []; } diff --git a/src/routes/custom-formats/[databaseId]/[id]/conditions/components/DraftConditionCard.svelte b/src/routes/custom-formats/[databaseId]/[id]/conditions/components/DraftConditionCard.svelte index 3fcd0ad..b97541d 100644 --- a/src/routes/custom-formats/[databaseId]/[id]/conditions/components/DraftConditionCard.svelte +++ b/src/routes/custom-formats/[databaseId]/[id]/conditions/components/DraftConditionCard.svelte @@ -47,26 +47,24 @@ return 'all'; // Default to 'all' if neither is checked } - // Filter condition types based on arrType - $: filteredConditionTypes = CONDITION_TYPES.filter( - (t) => t.arrType === 'all' || t.arrType === arrType - ); + // All condition types (no arrType filtering) + $: filteredConditionTypes = [...CONDITION_TYPES]; - // Get value options based on current type + // Get value options based on current type (no arrType filtering - show all options) $: valueOptions = getValueOptions(condition.type); function getValueOptions(type: string) { switch (type) { case 'source': - return SOURCE_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...SOURCE_VALUES]; case 'resolution': - return RESOLUTION_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...RESOLUTION_VALUES]; case 'quality_modifier': - return QUALITY_MODIFIER_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...QUALITY_MODIFIER_VALUES]; case 'release_type': - return RELEASE_TYPE_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...RELEASE_TYPE_VALUES]; case 'indexer_flag': - return INDEXER_FLAG_VALUES.filter((v) => v.arrType === 'all' || v.arrType === arrType); + return [...INDEXER_FLAG_VALUES]; default: return []; }