feat: Initial Lidarr support for searching for new artists
This commit is contained in:
@@ -28,6 +28,13 @@ impl App<'_> {
|
||||
.dispatch_network_event(LidarrEvent::ListArtists.into())
|
||||
.await;
|
||||
}
|
||||
ActiveLidarrBlock::AddArtistSearchResults => {
|
||||
self
|
||||
.dispatch_network_event(
|
||||
LidarrEvent::SearchNewArtist(self.extract_add_new_artist_search_query().await).into(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
@@ -35,6 +42,17 @@ impl App<'_> {
|
||||
self.reset_tick_count();
|
||||
}
|
||||
|
||||
async fn extract_add_new_artist_search_query(&self) -> String {
|
||||
self
|
||||
.data
|
||||
.lidarr_data
|
||||
.add_artist_search
|
||||
.as_ref()
|
||||
.expect("add_artist_search should be set")
|
||||
.text
|
||||
.clone()
|
||||
}
|
||||
|
||||
async fn check_for_lidarr_prompt_action(&mut self) {
|
||||
if self.data.lidarr_data.prompt_confirm {
|
||||
self.data.lidarr_data.prompt_confirm = false;
|
||||
|
||||
Reference in New Issue
Block a user