fix: Implemented a handful of fixes that are breaking changes between Sonarr v3 and v4

This commit is contained in:
2024-12-13 19:44:10 -07:00
parent f03120e5a1
commit 682bc91855
14 changed files with 137 additions and 91 deletions
+9 -3
View File
@@ -40,7 +40,7 @@ impl DrawUi for HistoryUi {
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
if let Route::Sonarr(active_sonarr_block, _) = app.get_current_route() {
draw_history_table(f, app, area);
if active_sonarr_block == ActiveSonarrBlock::HistoryItemDetails {
draw_history_item_details_popup(f, app);
}
@@ -64,7 +64,7 @@ fn draw_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
let history_row_mapping = |history_item: &SonarrHistoryItem| {
let SonarrHistoryItem {
source_title,
language,
languages,
quality,
event_type,
date,
@@ -80,7 +80,13 @@ fn draw_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
Row::new(vec![
Cell::from(source_title.to_string()),
Cell::from(event_type.to_string()),
Cell::from(language.name.to_owned()),
Cell::from(
languages
.iter()
.map(|language| language.name.to_owned())
.collect::<Vec<String>>()
.join(","),
),
Cell::from(quality.quality.name.to_owned()),
Cell::from(date.to_string()),
])