feat: Implemented TUI handler support for the Album Details popup in Lidarr

This commit is contained in:
2026-01-16 17:16:44 -07:00
parent bc6ecc39f4
commit caf4ad1e64
17 changed files with 2136 additions and 79 deletions
+23 -1
View File
@@ -2,7 +2,6 @@ use crate::{
models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock,
network::lidarr_network::LidarrEvent,
};
use super::App;
pub mod lidarr_context_clues;
@@ -67,6 +66,29 @@ impl App<'_> {
.dispatch_network_event(LidarrEvent::GetDownloads(500).into())
.await;
}
ActiveLidarrBlock::AlbumHistory => {
if !self.data.lidarr_data.albums.is_empty() {
self
.dispatch_network_event(
LidarrEvent::GetAlbumHistory(self.extract_artist_id().await, self.extract_album_id().await)
.into(),
)
.await;
}
}
ActiveLidarrBlock::ManualAlbumSearch => {
match self.data.lidarr_data.album_details_modal.as_ref() {
Some(album_details_modal) if album_details_modal.album_releases.is_empty() => {
self
.dispatch_network_event(
LidarrEvent::GetAlbumReleases(self.extract_artist_id().await, self.extract_album_id().await)
.into(),
)
.await;
}
_ => (),
}
}
ActiveLidarrBlock::AddArtistSearchResults => {
self
.dispatch_network_event(