Skip to content

Commit

Permalink
fix number filters
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Feb 7, 2025
1 parent b7058ef commit cb83d77
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 32 deletions.
49 changes: 19 additions & 30 deletions defaults/both/aspect2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,30 @@ dynamic_collections:
Aspect:
type: custom
data:
"1.33": Academy Aperture
"1.65": Early Widescreen
"1.66": European Widescreen
"1.78": Widescreen TV
"1.85": American Widescreen
"2.2": 70mm Frame
"2.35": Anamorphic Projection
"2.77": Cinerama
title_format: <<key>> - <<key_name>>
"1.33": 1.33 - Academy Aperture
"1.65": 1.65 - Early Widescreen
"1.66": 1.66 - European Widescreen
"1.78": 1.78 - Widescreen TV
"1.85": 1.85 - American Widescreen
"2.2": 2.2 - 70mm Frame
"2.35": 2.35 - Anamorphic Projection
"2.77": 2.77 - Cinerama
title_format: <<key_name>>
template:
- filter
- shared
template_variables:
filter_term:
default: aspect.gt
filter_term2:
default: aspect.lt
filter_value1:
"1.33": 1.32
"1.65": 1.64
"1.66": 1.65
"1.78": 1.77
"1.85": 1.84
"2.2": 2.19
"2.35": 2.34
"2.77": 2.76
filter_value2:
"1.33": 1.34
"1.65": 1.66
"1.66": 1.67
"1.78": 1.79
"1.85": 1.86
"2.2": 2.21
"2.35": 2.36
"2.77": 2.78
default: aspect
filter_value:
"1.33": 1.33
"1.65": 1.65
"1.66": 1.66
"1.78": 1.78
"1.85": 1.85
"2.2": 2.2
"2.35": 2.35
"2.77": 2.77
image:
default: aspect/<<key>>
translation_key:
Expand Down
4 changes: 2 additions & 2 deletions modules/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ def is_date_filter(value, modifier, data, final, current_time):
return False

def is_number_filter(value, modifier, data):
return value is None or (modifier == "" and value == data) \
or (modifier == ".not" and value != data) \
return value is None or (modifier == "" and value != data) \
or (modifier == ".not" and value == data) \
or (modifier == ".gt" and value <= data) \
or (modifier == ".gte" and value < data) \
or (modifier == ".lt" and value >= data) \
Expand Down

0 comments on commit cb83d77

Please sign in to comment.