fix: properly filter icon based on the festival
This commit is contained in:
parent
51d5904ffd
commit
3523dac46e
1 changed files with 17 additions and 14 deletions
|
@ -283,23 +283,26 @@ fn logos_filter(festival_data: &FestivalData, existing: Vec<LogoData>) -> Vec<L
|
|||
let name_lowercase0 = logo.name.to_ascii_lowercase();
|
||||
let name_lowercase = name_lowercase0.to_str().unwrap_or_default();
|
||||
|
||||
// if its a current festival filter based on it
|
||||
for festival in &festival_data.current {
|
||||
if name_lowercase.contains(festival) {
|
||||
filtered.push(logo);
|
||||
continue 'outer;
|
||||
if !festival_data.current.is_empty() {
|
||||
// if its a current festival filter based on it
|
||||
for festival in &festival_data.current {
|
||||
if name_lowercase.contains(festival) {
|
||||
filtered.push(logo);
|
||||
continue 'outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
// else filter using the excluded ones
|
||||
let mut excluded = false;
|
||||
for festival in &festival_data.exclusions {
|
||||
if name_lowercase.contains(festival) {
|
||||
excluded = true;
|
||||
} else {
|
||||
// else filter using the excluded ones
|
||||
let mut excluded = false;
|
||||
for festival in &festival_data.exclusions {
|
||||
if name_lowercase.contains(festival) {
|
||||
excluded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !excluded {
|
||||
filtered.push(logo);
|
||||
if !excluded {
|
||||
filtered.push(logo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue