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:
@@ -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(", ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user