feat: Full support for deleting an artist via CLI and TUI

This commit is contained in:
2026-01-05 15:44:51 -07:00
parent bc3aeefa6e
commit 6771a0ab38
43 changed files with 1995 additions and 332 deletions
+9 -1
View File
@@ -1,3 +1,4 @@
use delete_artist_ui::DeleteArtistUi;
use ratatui::{
Frame,
layout::{Constraint, Rect},
@@ -20,6 +21,8 @@ use crate::{
},
};
mod delete_artist_ui;
#[cfg(test)]
#[path = "library_ui_tests.rs"]
mod library_ui_tests;
@@ -29,14 +32,19 @@ pub(super) struct LibraryUi;
impl DrawUi for LibraryUi {
fn accepts(route: Route) -> bool {
if let Route::Lidarr(active_lidarr_block, _) = route {
return LIBRARY_BLOCKS.contains(&active_lidarr_block);
return DeleteArtistUi::accepts(route) || LIBRARY_BLOCKS.contains(&active_lidarr_block);
}
false
}
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
let route = app.get_current_route();
draw_library(f, app, area);
if DeleteArtistUi::accepts(route) {
DeleteArtistUi::draw(f, app, area);
}
}
}