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_lowercase0 = logo.name.to_ascii_lowercase();
|
||||||
let name_lowercase = name_lowercase0.to_str().unwrap_or_default();
|
let name_lowercase = name_lowercase0.to_str().unwrap_or_default();
|
||||||
|
|
||||||
// if its a current festival filter based on it
|
if !festival_data.current.is_empty() {
|
||||||
for festival in &festival_data.current {
|
// if its a current festival filter based on it
|
||||||
if name_lowercase.contains(festival) {
|
for festival in &festival_data.current {
|
||||||
filtered.push(logo);
|
if name_lowercase.contains(festival) {
|
||||||
continue 'outer;
|
filtered.push(logo);
|
||||||
|
continue 'outer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
// else filter using the excluded ones
|
// else filter using the excluded ones
|
||||||
let mut excluded = false;
|
let mut excluded = false;
|
||||||
for festival in &festival_data.exclusions {
|
for festival in &festival_data.exclusions {
|
||||||
if name_lowercase.contains(festival) {
|
if name_lowercase.contains(festival) {
|
||||||
excluded = true;
|
excluded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if !excluded {
|
if !excluded {
|
||||||
filtered.push(logo);
|
filtered.push(logo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue