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:
@@ -1,5 +1,6 @@
|
||||
use crate::app::App;
|
||||
use crate::models::servarr_data::sonarr::sonarr_data::{ActiveSonarrBlock, HISTORY_BLOCKS};
|
||||
use crate::models::servarr_models::Language;
|
||||
use crate::models::sonarr_models::{SonarrHistoryEventType, SonarrHistoryItem};
|
||||
use crate::models::Route;
|
||||
use crate::ui::styles::ManagarrStyle;
|
||||
@@ -77,7 +78,13 @@ fn draw_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
Cell::from(
|
||||
languages
|
||||
.iter()
|
||||
.map(|language| language.name.to_owned())
|
||||
.map(|language| {
|
||||
language
|
||||
.as_ref()
|
||||
.unwrap_or(&Language::default())
|
||||
.name
|
||||
.to_owned()
|
||||
})
|
||||
.collect::<Vec<String>>()
|
||||
.join(","),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user