fix: Wrapped all Sonarr use of Language with Option to fix the 'null' array issue in the new Sonarr API

This commit is contained in:
2025-12-13 13:06:33 -07:00
parent 9599ac28ca
commit 9c1a9cc3c5
17 changed files with 139 additions and 49 deletions
+14 -2
View File
@@ -210,13 +210,25 @@ fn blocklist_sorting_options() -> Vec<SortOption<BlocklistItem>> {
let a_languages = a
.languages
.iter()
.map(|lang| lang.name.to_lowercase())
.map(|lang| {
lang
.as_ref()
.unwrap_or(&Default::default())
.name
.to_lowercase()
})
.collect::<Vec<String>>()
.join(", ");
let b_languages = b
.languages
.iter()
.map(|lang| lang.name.to_lowercase())
.map(|lang| {
lang
.as_ref()
.unwrap_or(&Default::default())
.name
.to_lowercase()
})
.collect::<Vec<String>>()
.join(", ");