feat: Implemented the manual artist discography search tab in Lidarr's artist details UI
This commit is contained in:
@@ -65,6 +65,7 @@ pub static ARTIST_HISTORY_CONTEXT_CLUES: [ContextClue; 9] = [
|
||||
),
|
||||
(DEFAULT_KEYBINDINGS.edit, "edit artist"),
|
||||
(DEFAULT_KEYBINDINGS.submit, "details"),
|
||||
(DEFAULT_KEYBINDINGS.update, DEFAULT_KEYBINDINGS.update.desc),
|
||||
(DEFAULT_KEYBINDINGS.sort, DEFAULT_KEYBINDINGS.sort.desc),
|
||||
(DEFAULT_KEYBINDINGS.search, DEFAULT_KEYBINDINGS.search.desc),
|
||||
(DEFAULT_KEYBINDINGS.filter, DEFAULT_KEYBINDINGS.filter.desc),
|
||||
@@ -72,10 +73,25 @@ pub static ARTIST_HISTORY_CONTEXT_CLUES: [ContextClue; 9] = [
|
||||
DEFAULT_KEYBINDINGS.auto_search,
|
||||
DEFAULT_KEYBINDINGS.auto_search.desc,
|
||||
),
|
||||
(DEFAULT_KEYBINDINGS.update, DEFAULT_KEYBINDINGS.update.desc),
|
||||
(DEFAULT_KEYBINDINGS.esc, "cancel filter/close"),
|
||||
];
|
||||
|
||||
pub static MANUAL_ARTIST_SEARCH_CONTEXT_CLUES: [ContextClue; 7] = [
|
||||
(
|
||||
DEFAULT_KEYBINDINGS.refresh,
|
||||
DEFAULT_KEYBINDINGS.refresh.desc,
|
||||
),
|
||||
(DEFAULT_KEYBINDINGS.edit, "edit artist"),
|
||||
(DEFAULT_KEYBINDINGS.submit, "details"),
|
||||
(DEFAULT_KEYBINDINGS.update, DEFAULT_KEYBINDINGS.update.desc),
|
||||
(
|
||||
DEFAULT_KEYBINDINGS.auto_search,
|
||||
DEFAULT_KEYBINDINGS.auto_search.desc,
|
||||
),
|
||||
(DEFAULT_KEYBINDINGS.sort, DEFAULT_KEYBINDINGS.sort.desc),
|
||||
(DEFAULT_KEYBINDINGS.esc, DEFAULT_KEYBINDINGS.esc.desc),
|
||||
];
|
||||
|
||||
pub(in crate::app) struct LidarrContextClueProvider;
|
||||
|
||||
impl ContextClueProvider for LidarrContextClueProvider {
|
||||
|
||||
@@ -9,6 +9,7 @@ mod tests {
|
||||
use crate::app::lidarr::lidarr_context_clues::{
|
||||
ADD_ARTIST_SEARCH_RESULTS_CONTEXT_CLUES, ARTIST_DETAILS_CONTEXT_CLUES,
|
||||
ARTIST_HISTORY_CONTEXT_CLUES, ARTISTS_CONTEXT_CLUES, LidarrContextClueProvider,
|
||||
MANUAL_ARTIST_SEARCH_CONTEXT_CLUES,
|
||||
};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ADD_ROOT_FOLDER_BLOCKS, ActiveLidarrBlock, EDIT_ARTIST_BLOCKS, EDIT_INDEXER_BLOCKS,
|
||||
@@ -164,6 +165,10 @@ mod tests {
|
||||
artist_history_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.submit, "details")
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
artist_history_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.update, DEFAULT_KEYBINDINGS.update.desc)
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
artist_history_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.sort, DEFAULT_KEYBINDINGS.sort.desc)
|
||||
@@ -183,10 +188,6 @@ mod tests {
|
||||
DEFAULT_KEYBINDINGS.auto_search.desc
|
||||
)
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
artist_history_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.update, DEFAULT_KEYBINDINGS.update.desc)
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
artist_history_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.esc, "cancel filter/close")
|
||||
@@ -194,8 +195,51 @@ mod tests {
|
||||
assert_none!(artist_history_context_clues_iter.next());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_manual_artist_search_context_clues() {
|
||||
let mut manual_artist_search_context_clues_iter = MANUAL_ARTIST_SEARCH_CONTEXT_CLUES.iter();
|
||||
|
||||
assert_some_eq_x!(
|
||||
manual_artist_search_context_clues_iter.next(),
|
||||
&(
|
||||
DEFAULT_KEYBINDINGS.refresh,
|
||||
DEFAULT_KEYBINDINGS.refresh.desc
|
||||
)
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
manual_artist_search_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.edit, "edit artist")
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
manual_artist_search_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.submit, "details")
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
manual_artist_search_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.update, DEFAULT_KEYBINDINGS.update.desc)
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
manual_artist_search_context_clues_iter.next(),
|
||||
&(
|
||||
DEFAULT_KEYBINDINGS.auto_search,
|
||||
DEFAULT_KEYBINDINGS.auto_search.desc
|
||||
)
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
manual_artist_search_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.sort, DEFAULT_KEYBINDINGS.sort.desc)
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
manual_artist_search_context_clues_iter.next(),
|
||||
&(DEFAULT_KEYBINDINGS.esc, DEFAULT_KEYBINDINGS.esc.desc)
|
||||
);
|
||||
assert_none!(manual_artist_search_context_clues_iter.next());
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
#[case(0, ActiveLidarrBlock::ArtistDetails, &ARTIST_DETAILS_CONTEXT_CLUES)]
|
||||
#[case(1, ActiveLidarrBlock::ArtistHistory, &ARTIST_HISTORY_CONTEXT_CLUES)]
|
||||
#[case(2, ActiveLidarrBlock::ManualArtistSearch, &MANUAL_ARTIST_SEARCH_CONTEXT_CLUES)]
|
||||
fn test_lidarr_context_clue_provider_artist_info_tabs(
|
||||
#[case] index: usize,
|
||||
#[case] active_lidarr_block: ActiveLidarrBlock,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::app::App;
|
||||
use crate::models::lidarr_models::Artist;
|
||||
use crate::models::lidarr_models::{Artist, LidarrRelease};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::servarr_models::Indexer;
|
||||
use crate::network::NetworkEvent;
|
||||
@@ -78,6 +78,48 @@ mod tests {
|
||||
assert_eq!(app.tick_count, 0);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_dispatch_by_manual_artist_search_block() {
|
||||
let (tx, mut rx) = mpsc::channel::<NetworkEvent>(500);
|
||||
let mut app = App::test_default();
|
||||
app.data.lidarr_data.prompt_confirm = true;
|
||||
app.network_tx = Some(tx);
|
||||
app.data.lidarr_data.artists.set_items(vec![Artist {
|
||||
id: 1,
|
||||
..Artist::default()
|
||||
}]);
|
||||
|
||||
app
|
||||
.dispatch_by_lidarr_block(&ActiveLidarrBlock::ManualArtistSearch)
|
||||
.await;
|
||||
|
||||
assert!(app.is_loading);
|
||||
assert_eq!(
|
||||
rx.recv().await.unwrap(),
|
||||
LidarrEvent::GetDiscographyReleases(1).into()
|
||||
);
|
||||
assert!(!app.data.lidarr_data.prompt_confirm);
|
||||
assert_eq!(app.tick_count, 0);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_dispatch_by_manual_artist_search_block_discography_releases_non_empty() {
|
||||
let mut app = App::test_default();
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.discography_releases
|
||||
.set_items(vec![LidarrRelease::default()]);
|
||||
|
||||
app
|
||||
.dispatch_by_lidarr_block(&ActiveLidarrBlock::ManualArtistSearch)
|
||||
.await;
|
||||
|
||||
assert!(!app.is_loading);
|
||||
assert!(!app.data.lidarr_data.prompt_confirm);
|
||||
assert_eq!(app.tick_count, 0);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_dispatch_by_downloads_block() {
|
||||
let (tx, mut rx) = mpsc::channel::<NetworkEvent>(500);
|
||||
|
||||
@@ -45,6 +45,15 @@ impl App<'_> {
|
||||
)
|
||||
.await;
|
||||
}
|
||||
ActiveLidarrBlock::ManualArtistSearch => {
|
||||
if self.data.lidarr_data.discography_releases.is_empty() {
|
||||
self
|
||||
.dispatch_network_event(
|
||||
LidarrEvent::GetDiscographyReleases(self.extract_artist_id().await).into(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
}
|
||||
ActiveLidarrBlock::AddArtistSearchResults => {
|
||||
self
|
||||
.dispatch_network_event(
|
||||
|
||||
@@ -5,13 +5,17 @@ use crate::handlers::lidarr_handlers::library::delete_album_handler::DeleteAlbum
|
||||
use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
|
||||
use crate::handlers::{KeyEventHandler, handle_prompt_toggle};
|
||||
use crate::matches_key;
|
||||
use crate::models::lidarr_models::{Album, LidarrHistoryItem};
|
||||
use crate::models::lidarr_models::{
|
||||
Album, LidarrHistoryItem, LidarrRelease, LidarrReleaseDownloadBody,
|
||||
};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ARTIST_DETAILS_BLOCKS, ActiveLidarrBlock, DELETE_ALBUM_SELECTION_BLOCKS,
|
||||
EDIT_ARTIST_SELECTION_BLOCKS,
|
||||
};
|
||||
use crate::models::stateful_table::SortOption;
|
||||
use crate::models::{BlockSelectionState, Route};
|
||||
use crate::network::lidarr_network::LidarrEvent;
|
||||
use serde_json::Number;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "artist_details_handler_tests.rs"]
|
||||
@@ -53,21 +57,23 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
.filter_error_block(ActiveLidarrBlock::FilterArtistHistoryError.into())
|
||||
.filter_field_fn(|history_item: &LidarrHistoryItem| &history_item.source_title.text);
|
||||
|
||||
let artist_releases_table_handling_config =
|
||||
TableHandlingConfig::new(ActiveLidarrBlock::ManualArtistSearch.into())
|
||||
.sorting_block(ActiveLidarrBlock::ManualArtistSearchSortPrompt.into())
|
||||
.sort_options(releases_sorting_options());
|
||||
|
||||
if !handle_table(
|
||||
self,
|
||||
|app| &mut app.data.lidarr_data.albums,
|
||||
albums_table_handling_config,
|
||||
) && !handle_table(
|
||||
self,
|
||||
|app| {
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_mut()
|
||||
.expect("Artist history is undefined")
|
||||
},
|
||||
|app| &mut app.data.lidarr_data.artist_history,
|
||||
artist_history_table_handling_config,
|
||||
) && !handle_table(
|
||||
self,
|
||||
|app| &mut app.data.lidarr_data.discography_releases,
|
||||
artist_releases_table_handling_config,
|
||||
) {
|
||||
match self.active_lidarr_block {
|
||||
_ if DeleteAlbumHandler::accepts(self.active_lidarr_block) => {
|
||||
@@ -106,10 +112,16 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
}
|
||||
|
||||
fn is_ready(&self) -> bool {
|
||||
if self.active_lidarr_block == ActiveLidarrBlock::ArtistHistory {
|
||||
!self.app.is_loading && self.app.data.lidarr_data.artist_history.is_some()
|
||||
} else {
|
||||
!self.app.is_loading
|
||||
if self.app.is_loading {
|
||||
return false;
|
||||
}
|
||||
|
||||
match self.active_lidarr_block {
|
||||
ActiveLidarrBlock::ArtistHistory => !self.app.data.lidarr_data.artist_history.is_empty(),
|
||||
ActiveLidarrBlock::ManualArtistSearch => {
|
||||
!self.app.data.lidarr_data.discography_releases.is_empty()
|
||||
}
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +145,9 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
|
||||
fn handle_left_right_action(&mut self) {
|
||||
match self.active_lidarr_block {
|
||||
ActiveLidarrBlock::ArtistDetails | ActiveLidarrBlock::ArtistHistory => match self.key {
|
||||
ActiveLidarrBlock::ArtistDetails
|
||||
| ActiveLidarrBlock::ArtistHistory
|
||||
| ActiveLidarrBlock::ManualArtistSearch => match self.key {
|
||||
_ if matches_key!(left, self.key) => {
|
||||
self.app.data.lidarr_data.artist_info_tabs.previous();
|
||||
self.app.pop_and_push_navigation_stack(
|
||||
@@ -159,7 +173,8 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
_ => (),
|
||||
},
|
||||
ActiveLidarrBlock::UpdateAndScanArtistPrompt
|
||||
| ActiveLidarrBlock::AutomaticallySearchArtistPrompt => {
|
||||
| ActiveLidarrBlock::AutomaticallySearchArtistPrompt
|
||||
| ActiveLidarrBlock::ManualArtistSearchConfirmPrompt => {
|
||||
handle_prompt_toggle(self.app, self.key);
|
||||
}
|
||||
_ => (),
|
||||
@@ -168,20 +183,34 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
|
||||
fn handle_submit(&mut self) {
|
||||
match self.active_lidarr_block {
|
||||
ActiveLidarrBlock::ArtistHistory
|
||||
if !self
|
||||
.app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.expect("Artist history should be Some")
|
||||
.is_empty() =>
|
||||
{
|
||||
ActiveLidarrBlock::ArtistHistory if !self.app.data.lidarr_data.artist_history.is_empty() => {
|
||||
self
|
||||
.app
|
||||
.push_navigation_stack(ActiveLidarrBlock::ArtistHistoryDetails.into());
|
||||
}
|
||||
ActiveLidarrBlock::ManualArtistSearch => {
|
||||
self
|
||||
.app
|
||||
.push_navigation_stack(ActiveLidarrBlock::ManualArtistSearchConfirmPrompt.into());
|
||||
}
|
||||
ActiveLidarrBlock::ManualArtistSearchConfirmPrompt => {
|
||||
if self.app.data.lidarr_data.prompt_confirm {
|
||||
let LidarrRelease {
|
||||
guid, indexer_id, ..
|
||||
} = self
|
||||
.app
|
||||
.data
|
||||
.lidarr_data
|
||||
.discography_releases
|
||||
.current_selection()
|
||||
.clone();
|
||||
let params = LidarrReleaseDownloadBody { guid, indexer_id };
|
||||
self.app.data.lidarr_data.prompt_confirm_action =
|
||||
Some(LidarrEvent::DownloadRelease(params));
|
||||
}
|
||||
|
||||
self.app.pop_navigation_stack();
|
||||
}
|
||||
ActiveLidarrBlock::AutomaticallySearchArtistPrompt => {
|
||||
if self.app.data.lidarr_data.prompt_confirm {
|
||||
self.app.data.lidarr_data.prompt_confirm_action = Some(
|
||||
@@ -206,7 +235,8 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
fn handle_esc(&mut self) {
|
||||
match self.active_lidarr_block {
|
||||
ActiveLidarrBlock::UpdateAndScanArtistPrompt
|
||||
| ActiveLidarrBlock::AutomaticallySearchArtistPrompt => {
|
||||
| ActiveLidarrBlock::AutomaticallySearchArtistPrompt
|
||||
| ActiveLidarrBlock::ManualArtistSearchConfirmPrompt => {
|
||||
self.app.pop_navigation_stack();
|
||||
self.app.data.lidarr_data.prompt_confirm = false;
|
||||
}
|
||||
@@ -219,25 +249,16 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.expect("Artist history is not populated")
|
||||
.filtered_items
|
||||
.is_some()
|
||||
{
|
||||
self
|
||||
.app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_mut()
|
||||
.expect("Artist history is not populated")
|
||||
.reset_filter();
|
||||
self.app.data.lidarr_data.artist_history.reset_filter();
|
||||
} else {
|
||||
self.app.pop_navigation_stack();
|
||||
self.app.data.lidarr_data.reset_artist_info_tabs();
|
||||
}
|
||||
}
|
||||
ActiveLidarrBlock::ArtistDetails => {
|
||||
ActiveLidarrBlock::ArtistDetails | ActiveLidarrBlock::ManualArtistSearch => {
|
||||
self.app.pop_navigation_stack();
|
||||
self.app.data.lidarr_data.reset_artist_info_tabs();
|
||||
}
|
||||
@@ -287,7 +308,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
ActiveLidarrBlock::ArtistHistory => match self.key {
|
||||
ActiveLidarrBlock::ArtistHistory | ActiveLidarrBlock::ManualArtistSearch => match self.key {
|
||||
_ if matches_key!(refresh, key) => self
|
||||
.app
|
||||
.pop_and_push_navigation_stack(self.active_lidarr_block.into()),
|
||||
@@ -334,6 +355,25 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
self.app.pop_navigation_stack();
|
||||
}
|
||||
}
|
||||
ActiveLidarrBlock::ManualArtistSearchConfirmPrompt => {
|
||||
if matches_key!(confirm, key) {
|
||||
self.app.data.lidarr_data.prompt_confirm = true;
|
||||
let LidarrRelease {
|
||||
guid, indexer_id, ..
|
||||
} = self
|
||||
.app
|
||||
.data
|
||||
.lidarr_data
|
||||
.discography_releases
|
||||
.current_selection()
|
||||
.clone();
|
||||
let params = LidarrReleaseDownloadBody { guid, indexer_id };
|
||||
self.app.data.lidarr_data.prompt_confirm_action =
|
||||
Some(LidarrEvent::DownloadRelease(params));
|
||||
|
||||
self.app.pop_navigation_stack();
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
@@ -346,3 +386,61 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for ArtistDetailsHandler
|
||||
self.app.get_current_route()
|
||||
}
|
||||
}
|
||||
|
||||
fn releases_sorting_options() -> Vec<SortOption<LidarrRelease>> {
|
||||
vec![
|
||||
SortOption {
|
||||
name: "Source",
|
||||
cmp_fn: Some(|a, b| a.protocol.cmp(&b.protocol)),
|
||||
},
|
||||
SortOption {
|
||||
name: "Age",
|
||||
cmp_fn: Some(|a, b| a.age.cmp(&b.age)),
|
||||
},
|
||||
SortOption {
|
||||
name: "Rejected",
|
||||
cmp_fn: Some(|a, b| a.rejected.cmp(&b.rejected)),
|
||||
},
|
||||
SortOption {
|
||||
name: "Title",
|
||||
cmp_fn: Some(|a, b| {
|
||||
a.title
|
||||
.text
|
||||
.to_lowercase()
|
||||
.cmp(&b.title.text.to_lowercase())
|
||||
}),
|
||||
},
|
||||
SortOption {
|
||||
name: "Indexer",
|
||||
cmp_fn: Some(|a, b| a.indexer.to_lowercase().cmp(&b.indexer.to_lowercase())),
|
||||
},
|
||||
SortOption {
|
||||
name: "Size",
|
||||
cmp_fn: Some(|a, b| a.size.cmp(&b.size)),
|
||||
},
|
||||
SortOption {
|
||||
name: "Peers",
|
||||
cmp_fn: Some(|a, b| {
|
||||
let default_number = Number::from(i64::MAX);
|
||||
let seeder_a = a
|
||||
.seeders
|
||||
.as_ref()
|
||||
.unwrap_or(&default_number)
|
||||
.as_u64()
|
||||
.unwrap();
|
||||
let seeder_b = b
|
||||
.seeders
|
||||
.as_ref()
|
||||
.unwrap_or(&default_number)
|
||||
.as_u64()
|
||||
.unwrap();
|
||||
|
||||
seeder_a.cmp(&seeder_b)
|
||||
}),
|
||||
},
|
||||
SortOption {
|
||||
name: "Quality",
|
||||
cmp_fn: Some(|a, b| a.quality.cmp(&b.quality)),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ mod tests {
|
||||
use crate::app::key_binding::DEFAULT_KEYBINDINGS;
|
||||
use crate::handlers::KeyEventHandler;
|
||||
use crate::handlers::lidarr_handlers::library::artist_details_handler::ArtistDetailsHandler;
|
||||
use crate::models::lidarr_models::LidarrHistoryItem;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ARTIST_DETAILS_BLOCKS, ActiveLidarrBlock, DELETE_ALBUM_BLOCKS,
|
||||
};
|
||||
use crate::models::stateful_table::StatefulTable;
|
||||
|
||||
mod test_handle_delete {
|
||||
use super::*;
|
||||
@@ -86,7 +86,6 @@ mod tests {
|
||||
use crate::handlers::lidarr_handlers::library::artist_details_handler::ArtistDetailsHandler;
|
||||
use crate::models::lidarr_models::LidarrHistoryItem;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::stateful_table::StatefulTable;
|
||||
use crate::network::lidarr_network::LidarrEvent;
|
||||
use crate::network::lidarr_network::lidarr_network_test_utils::test_utils::artist;
|
||||
use crate::{assert_navigation_popped, assert_navigation_pushed};
|
||||
@@ -145,9 +144,11 @@ mod tests {
|
||||
#[test]
|
||||
fn test_artist_history_submit() {
|
||||
let mut app = App::test_default();
|
||||
let mut artist_history = StatefulTable::default();
|
||||
artist_history.set_items(vec![LidarrHistoryItem::default()]);
|
||||
app.data.lidarr_data.artist_history = Some(artist_history);
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.set_items(vec![LidarrHistoryItem::default()]);
|
||||
|
||||
ArtistDetailsHandler::new(SUBMIT_KEY, &mut app, ActiveLidarrBlock::ArtistHistory, None)
|
||||
.handle();
|
||||
@@ -159,7 +160,6 @@ mod tests {
|
||||
fn test_artist_history_submit_no_op_when_artist_history_is_empty() {
|
||||
let mut app = App::test_default();
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistHistory.into());
|
||||
app.data.lidarr_data.artist_history = Some(StatefulTable::default());
|
||||
|
||||
ArtistDetailsHandler::new(SUBMIT_KEY, &mut app, ActiveLidarrBlock::ArtistHistory, None)
|
||||
.handle();
|
||||
@@ -218,13 +218,12 @@ mod tests {
|
||||
#[test]
|
||||
fn test_artist_history_esc_resets_filter_if_one_is_set_instead_of_closing_the_window() {
|
||||
let mut app = App::test_default();
|
||||
let artist_history = StatefulTable {
|
||||
app.data.lidarr_data.artist_history = StatefulTable {
|
||||
filter: Some("Test".into()),
|
||||
filtered_items: Some(vec![LidarrHistoryItem::default()]),
|
||||
filtered_state: Some(TableState::default()),
|
||||
..StatefulTable::default()
|
||||
};
|
||||
app.data.lidarr_data.artist_history = Some(artist_history);
|
||||
app.push_navigation_stack(ActiveLidarrBlock::Artists.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistHistory.into());
|
||||
|
||||
@@ -234,25 +233,9 @@ mod tests {
|
||||
app.get_current_route(),
|
||||
ActiveLidarrBlock::ArtistHistory.into()
|
||||
);
|
||||
assert_none!(app.data.lidarr_data.artist_history.as_ref().unwrap().filter);
|
||||
assert_none!(
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.filtered_items
|
||||
);
|
||||
assert_none!(
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.filtered_state
|
||||
);
|
||||
assert_none!(app.data.lidarr_data.artist_history.filter);
|
||||
assert_none!(app.data.lidarr_data.artist_history.filtered_items);
|
||||
assert_none!(app.data.lidarr_data.artist_history.filtered_state);
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
@@ -691,10 +674,14 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_artist_details_handler_ready_when_not_loading_and_artist_history_is_some() {
|
||||
fn test_artist_details_handler_ready_when_not_loading_and_artist_history_is_non_empty() {
|
||||
let mut app = App::test_default();
|
||||
app.push_navigation_stack(ActiveLidarrBlock::Artists.into());
|
||||
app.data.lidarr_data.artist_history = Some(StatefulTable::default());
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.set_items(vec![LidarrHistoryItem::default()]);
|
||||
|
||||
let handler = ArtistDetailsHandler::new(
|
||||
DEFAULT_KEYBINDINGS.esc.key,
|
||||
|
||||
@@ -7,6 +7,7 @@ use crate::app::context_clues::{
|
||||
};
|
||||
use crate::app::lidarr::lidarr_context_clues::{
|
||||
ARTIST_DETAILS_CONTEXT_CLUES, ARTIST_HISTORY_CONTEXT_CLUES, ARTISTS_CONTEXT_CLUES,
|
||||
MANUAL_ARTIST_SEARCH_CONTEXT_CLUES,
|
||||
};
|
||||
use crate::models::lidarr_models::{LidarrRelease, LidarrTask};
|
||||
use crate::models::servarr_data::modals::EditIndexerModal;
|
||||
@@ -57,7 +58,7 @@ pub struct LidarrData<'a> {
|
||||
pub add_root_folder_modal: Option<AddRootFolderModal>,
|
||||
pub add_searched_artists: Option<StatefulTable<AddArtistSearchResult>>,
|
||||
pub albums: StatefulTable<Album>,
|
||||
pub artist_history: Option<StatefulTable<LidarrHistoryItem>>,
|
||||
pub artist_history: StatefulTable<LidarrHistoryItem>,
|
||||
pub artist_info_tabs: TabState,
|
||||
pub artists: StatefulTable<Artist>,
|
||||
pub delete_files: bool,
|
||||
@@ -97,7 +98,7 @@ impl LidarrData<'_> {
|
||||
pub fn reset_artist_info_tabs(&mut self) {
|
||||
self.albums = StatefulTable::default();
|
||||
self.discography_releases = StatefulTable::default();
|
||||
self.artist_history = None;
|
||||
self.artist_history = StatefulTable::default();
|
||||
self.artist_info_tabs.index = 0;
|
||||
}
|
||||
|
||||
@@ -142,7 +143,7 @@ impl<'a> Default for LidarrData<'a> {
|
||||
add_root_folder_modal: None,
|
||||
add_searched_artists: None,
|
||||
albums: StatefulTable::default(),
|
||||
artist_history: None,
|
||||
artist_history: StatefulTable::default(),
|
||||
artists: StatefulTable::default(),
|
||||
delete_files: false,
|
||||
discography_releases: StatefulTable::default(),
|
||||
@@ -220,6 +221,12 @@ impl<'a> Default for LidarrData<'a> {
|
||||
contextual_help: Some(&ARTIST_HISTORY_CONTEXT_CLUES),
|
||||
config: None,
|
||||
},
|
||||
TabRoute {
|
||||
title: "Manual Search".to_string(),
|
||||
route: ActiveLidarrBlock::ManualArtistSearch.into(),
|
||||
contextual_help: Some(&MANUAL_ARTIST_SEARCH_CONTEXT_CLUES),
|
||||
config: None,
|
||||
},
|
||||
]),
|
||||
}
|
||||
}
|
||||
@@ -297,14 +304,7 @@ impl LidarrData<'_> {
|
||||
let mut indexer_test_all_results = StatefulTable::default();
|
||||
indexer_test_all_results.set_items(vec![indexer_test_result()]);
|
||||
|
||||
let mut artist_history = StatefulTable::default();
|
||||
artist_history.set_items(vec![lidarr_history_item()]);
|
||||
artist_history.sorting(vec![sort_option!(id)]);
|
||||
artist_history.search = Some("artist history search".into());
|
||||
artist_history.filter = Some("artist history filter".into());
|
||||
|
||||
let mut lidarr_data = LidarrData {
|
||||
artist_history: Some(artist_history),
|
||||
delete_files: true,
|
||||
disk_space_vec: vec![diskspace()],
|
||||
quality_profile_map: quality_profile_map(),
|
||||
@@ -322,6 +322,12 @@ impl LidarrData<'_> {
|
||||
version: "1.2.3.4".to_owned(),
|
||||
..LidarrData::default()
|
||||
};
|
||||
lidarr_data
|
||||
.artist_history
|
||||
.set_items(vec![lidarr_history_item()]);
|
||||
lidarr_data.artist_history.sorting(vec![sort_option!(id)]);
|
||||
lidarr_data.artist_history.search = Some("artist history search".into());
|
||||
lidarr_data.artist_history.filter = Some("artist history filter".into());
|
||||
lidarr_data.albums.set_items(vec![album()]);
|
||||
lidarr_data.albums.search = Some("album search".into());
|
||||
lidarr_data.artists.set_items(vec![artist()]);
|
||||
@@ -370,6 +376,9 @@ pub enum ActiveLidarrBlock {
|
||||
ArtistHistoryDetails,
|
||||
ArtistHistorySortPrompt,
|
||||
ArtistsSortPrompt,
|
||||
ManualArtistSearch,
|
||||
ManualArtistSearchConfirmPrompt,
|
||||
ManualArtistSearchSortPrompt,
|
||||
AddArtistAlreadyInLibrary,
|
||||
AddArtistConfirmPrompt,
|
||||
AddArtistEmptySearchResults,
|
||||
@@ -471,7 +480,7 @@ pub static LIBRARY_BLOCKS: [ActiveLidarrBlock; 7] = [
|
||||
ActiveLidarrBlock::UpdateAllArtistsPrompt,
|
||||
];
|
||||
|
||||
pub static ARTIST_DETAILS_BLOCKS: [ActiveLidarrBlock; 12] = [
|
||||
pub static ARTIST_DETAILS_BLOCKS: [ActiveLidarrBlock; 15] = [
|
||||
ActiveLidarrBlock::ArtistDetails,
|
||||
ActiveLidarrBlock::ArtistHistory,
|
||||
ActiveLidarrBlock::ArtistHistoryDetails,
|
||||
@@ -479,6 +488,9 @@ pub static ARTIST_DETAILS_BLOCKS: [ActiveLidarrBlock; 12] = [
|
||||
ActiveLidarrBlock::AutomaticallySearchArtistPrompt,
|
||||
ActiveLidarrBlock::FilterArtistHistory,
|
||||
ActiveLidarrBlock::FilterArtistHistoryError,
|
||||
ActiveLidarrBlock::ManualArtistSearch,
|
||||
ActiveLidarrBlock::ManualArtistSearchConfirmPrompt,
|
||||
ActiveLidarrBlock::ManualArtistSearchSortPrompt,
|
||||
ActiveLidarrBlock::SearchAlbums,
|
||||
ActiveLidarrBlock::SearchAlbumsError,
|
||||
ActiveLidarrBlock::SearchArtistHistory,
|
||||
|
||||
@@ -6,8 +6,9 @@ mod tests {
|
||||
};
|
||||
use crate::app::lidarr::lidarr_context_clues::{
|
||||
ARTIST_DETAILS_CONTEXT_CLUES, ARTIST_HISTORY_CONTEXT_CLUES, ARTISTS_CONTEXT_CLUES,
|
||||
MANUAL_ARTIST_SEARCH_CONTEXT_CLUES,
|
||||
};
|
||||
use crate::models::lidarr_models::{Album, LidarrRelease};
|
||||
use crate::models::lidarr_models::{Album, LidarrHistoryItem, LidarrRelease};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ADD_ARTIST_BLOCKS, ADD_ARTIST_SELECTION_BLOCKS, ADD_ROOT_FOLDER_BLOCKS, ARTIST_DETAILS_BLOCKS,
|
||||
DELETE_ALBUM_BLOCKS, DELETE_ALBUM_SELECTION_BLOCKS, DELETE_ARTIST_BLOCKS,
|
||||
@@ -16,7 +17,6 @@ mod tests {
|
||||
EDIT_INDEXER_TORRENT_SELECTION_BLOCKS, HISTORY_BLOCKS, INDEXER_SETTINGS_BLOCKS,
|
||||
INDEXER_SETTINGS_SELECTION_BLOCKS, INDEXERS_BLOCKS, ROOT_FOLDERS_BLOCKS, SYSTEM_DETAILS_BLOCKS,
|
||||
};
|
||||
use crate::models::stateful_table::StatefulTable;
|
||||
use crate::models::{
|
||||
BlockSelectionState, Route,
|
||||
servarr_data::lidarr::lidarr_data::{ActiveLidarrBlock, LIBRARY_BLOCKS, LidarrData},
|
||||
@@ -63,14 +63,16 @@ mod tests {
|
||||
lidarr_data
|
||||
.discography_releases
|
||||
.set_items(vec![LidarrRelease::default()]);
|
||||
lidarr_data.artist_history = Some(StatefulTable::default());
|
||||
lidarr_data
|
||||
.artist_history
|
||||
.set_items(vec![LidarrHistoryItem::default()]);
|
||||
lidarr_data.artist_info_tabs.index = 1;
|
||||
|
||||
lidarr_data.reset_artist_info_tabs();
|
||||
|
||||
assert_is_empty!(lidarr_data.albums);
|
||||
assert_is_empty!(lidarr_data.discography_releases);
|
||||
assert_none!(lidarr_data.artist_history);
|
||||
assert_is_empty!(lidarr_data.artist_history);
|
||||
assert_eq!(lidarr_data.artist_info_tabs.index, 0);
|
||||
}
|
||||
|
||||
@@ -144,7 +146,7 @@ mod tests {
|
||||
assert_none!(lidarr_data.add_searched_artists);
|
||||
assert_is_empty!(lidarr_data.albums);
|
||||
assert_is_empty!(lidarr_data.artists);
|
||||
assert_none!(lidarr_data.artist_history);
|
||||
assert_is_empty!(lidarr_data.artist_history);
|
||||
assert!(!lidarr_data.delete_files);
|
||||
assert_is_empty!(lidarr_data.disk_space_vec);
|
||||
assert_is_empty!(lidarr_data.downloads);
|
||||
@@ -235,7 +237,7 @@ mod tests {
|
||||
);
|
||||
assert_none!(lidarr_data.main_tabs.tabs[5].config);
|
||||
|
||||
assert_eq!(lidarr_data.artist_info_tabs.tabs.len(), 2);
|
||||
assert_eq!(lidarr_data.artist_info_tabs.tabs.len(), 3);
|
||||
assert_str_eq!(lidarr_data.artist_info_tabs.tabs[0].title, "Albums");
|
||||
assert_eq!(
|
||||
lidarr_data.artist_info_tabs.tabs[0].route,
|
||||
@@ -257,6 +259,17 @@ mod tests {
|
||||
&ARTIST_HISTORY_CONTEXT_CLUES
|
||||
);
|
||||
assert_none!(lidarr_data.artist_info_tabs.tabs[1].config);
|
||||
|
||||
assert_str_eq!(lidarr_data.artist_info_tabs.tabs[2].title, "Manual Search");
|
||||
assert_eq!(
|
||||
lidarr_data.artist_info_tabs.tabs[2].route,
|
||||
ActiveLidarrBlock::ManualArtistSearch.into()
|
||||
);
|
||||
assert_some_eq_x!(
|
||||
&lidarr_data.artist_info_tabs.tabs[2].contextual_help,
|
||||
&MANUAL_ARTIST_SEARCH_CONTEXT_CLUES
|
||||
);
|
||||
assert_none!(lidarr_data.artist_info_tabs.tabs[2].config);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -273,7 +286,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_artist_details_blocks_contains_expected_blocks() {
|
||||
assert_eq!(ARTIST_DETAILS_BLOCKS.len(), 12);
|
||||
assert_eq!(ARTIST_DETAILS_BLOCKS.len(), 15);
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::ArtistDetails));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::ArtistHistory));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::ArtistHistoryDetails));
|
||||
@@ -281,6 +294,9 @@ mod tests {
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::AutomaticallySearchArtistPrompt));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::FilterArtistHistory));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::FilterArtistHistoryError));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::ManualArtistSearch));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::ManualArtistSearchConfirmPrompt));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::ManualArtistSearchSortPrompt));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::SearchAlbums));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::SearchAlbumsError));
|
||||
assert!(ARTIST_DETAILS_BLOCKS.contains(&ActiveLidarrBlock::SearchArtistHistory));
|
||||
|
||||
@@ -5,7 +5,7 @@ mod tests {
|
||||
LidarrHistoryItem, LidarrRelease, LidarrSerdeable, MonitorType, NewItemMonitorType,
|
||||
};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::stateful_table::{SortOption, StatefulTable};
|
||||
use crate::models::stateful_table::SortOption;
|
||||
use crate::network::NetworkResource;
|
||||
use crate::network::lidarr_network::LidarrEvent;
|
||||
use crate::network::lidarr_network::lidarr_network_test_utils::test_utils::{
|
||||
@@ -156,10 +156,6 @@ mod tests {
|
||||
.query("artistId=1")
|
||||
.build_for(LidarrEvent::GetArtistHistory(1))
|
||||
.await;
|
||||
let mut artist_history_table = StatefulTable {
|
||||
sort_asc: true,
|
||||
..StatefulTable::default()
|
||||
};
|
||||
if use_custom_sorting {
|
||||
let cmp_fn = |a: &LidarrHistoryItem, b: &LidarrHistoryItem| {
|
||||
a.source_title
|
||||
@@ -173,7 +169,13 @@ mod tests {
|
||||
name: "Source Title",
|
||||
cmp_fn: Some(cmp_fn),
|
||||
};
|
||||
artist_history_table.sorting(vec![history_sort_option]);
|
||||
app
|
||||
.lock()
|
||||
.await
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.sorting(vec![history_sort_option]);
|
||||
}
|
||||
app
|
||||
.lock()
|
||||
@@ -182,7 +184,7 @@ mod tests {
|
||||
.lidarr_data
|
||||
.artists
|
||||
.set_items(vec![artist()]);
|
||||
app.lock().await.data.lidarr_data.artist_history = Some(artist_history_table);
|
||||
app.lock().await.data.lidarr_data.artist_history.sort_asc = true;
|
||||
app.lock().await.server_tabs.set_index(2);
|
||||
let mut network = test_network(&app);
|
||||
|
||||
@@ -195,20 +197,11 @@ mod tests {
|
||||
};
|
||||
async_server.assert_async().await;
|
||||
let app = app.lock().await;
|
||||
assert_some!(&app.data.lidarr_data.artist_history);
|
||||
assert_eq!(
|
||||
app.data.lidarr_data.artist_history.as_ref().unwrap().items,
|
||||
app.data.lidarr_data.artist_history.items,
|
||||
expected_history_items
|
||||
);
|
||||
assert!(
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.sort_asc
|
||||
);
|
||||
assert!(app.data.lidarr_data.artist_history.sort_asc);
|
||||
assert_eq!(history_items, response);
|
||||
}
|
||||
|
||||
@@ -281,20 +274,11 @@ mod tests {
|
||||
};
|
||||
async_server.assert_async().await;
|
||||
let app = app.lock().await;
|
||||
assert_some!(&app.data.lidarr_data.artist_history);
|
||||
assert_eq!(
|
||||
app.data.lidarr_data.artist_history.as_ref().unwrap().items,
|
||||
app.data.lidarr_data.artist_history.items,
|
||||
expected_history_items
|
||||
);
|
||||
assert!(
|
||||
!app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.sort_asc
|
||||
);
|
||||
assert!(!app.data.lidarr_data.artist_history.sort_asc);
|
||||
assert_eq!(history_items, response);
|
||||
}
|
||||
|
||||
@@ -342,12 +326,14 @@ mod tests {
|
||||
name: "Source Title",
|
||||
cmp_fn: Some(cmp_fn),
|
||||
};
|
||||
let mut artist_history_table = StatefulTable {
|
||||
sort_asc: true,
|
||||
..StatefulTable::default()
|
||||
};
|
||||
artist_history_table.sorting(vec![history_sort_option]);
|
||||
app.lock().await.data.lidarr_data.artist_history = Some(artist_history_table);
|
||||
app
|
||||
.lock()
|
||||
.await
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.sorting(vec![history_sort_option]);
|
||||
app.lock().await.data.lidarr_data.artist_history.sort_asc = true;
|
||||
app
|
||||
.lock()
|
||||
.await
|
||||
@@ -371,25 +357,8 @@ mod tests {
|
||||
};
|
||||
async_server.assert_async().await;
|
||||
let app = app.lock().await;
|
||||
assert_some!(&app.data.lidarr_data.artist_history);
|
||||
assert!(
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.is_empty()
|
||||
);
|
||||
assert!(
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.sort_asc
|
||||
);
|
||||
assert!(app.data.lidarr_data.artist_history.is_empty());
|
||||
assert!(app.data.lidarr_data.artist_history.sort_asc);
|
||||
assert_eq!(history_items, response);
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ impl Network<'_, '_> {
|
||||
Route::Lidarr(ActiveLidarrBlock::ArtistHistorySortPrompt, _)
|
||||
);
|
||||
|
||||
let artist_history = app.data.lidarr_data.artist_history.get_or_insert_default();
|
||||
let artist_history = &mut app.data.lidarr_data.artist_history;
|
||||
|
||||
if !is_sorting {
|
||||
history_vec.sort_by(|a, b| a.id.cmp(&b.id));
|
||||
|
||||
@@ -9,11 +9,12 @@ use regex::Regex;
|
||||
|
||||
use crate::app::App;
|
||||
use crate::models::Route;
|
||||
use crate::models::lidarr_models::{Album, LidarrHistoryItem};
|
||||
use crate::models::lidarr_models::{Album, LidarrHistoryItem, LidarrRelease};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{ARTIST_DETAILS_BLOCKS, ActiveLidarrBlock};
|
||||
use crate::ui::lidarr_ui::library::delete_album_ui::DeleteAlbumUi;
|
||||
use crate::ui::lidarr_ui::lidarr_ui_utils::create_history_event_details;
|
||||
use crate::ui::styles::{ManagarrStyle, secondary_style};
|
||||
use crate::ui::utils::decorate_peer_style;
|
||||
use crate::ui::utils::{
|
||||
borderless_block, get_width_from_percentage, layout_block_top_border, title_block,
|
||||
};
|
||||
@@ -26,6 +27,7 @@ use crate::ui::{DrawUi, draw_popup, draw_tabs};
|
||||
use crate::utils::convert_to_gb;
|
||||
use ratatui::layout::Alignment;
|
||||
use ratatui::text::Text;
|
||||
use serde_json::Number;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "artist_details_ui_tests.rs"]
|
||||
@@ -105,6 +107,9 @@ impl DrawUi for ArtistDetailsUi {
|
||||
f.area(),
|
||||
);
|
||||
}
|
||||
ActiveLidarrBlock::ManualArtistSearchConfirmPrompt => {
|
||||
draw_manual_artist_search_confirm_prompt(f, app);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
};
|
||||
@@ -241,6 +246,7 @@ fn draw_artist_details(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
match active_lidarr_block {
|
||||
ActiveLidarrBlock::ArtistDetails => draw_albums_table(f, app, area),
|
||||
ActiveLidarrBlock::ArtistHistory => draw_artist_history_table(f, app, area),
|
||||
ActiveLidarrBlock::ManualArtistSearch => draw_artist_releases(f, app, area),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
@@ -338,98 +344,98 @@ fn draw_albums_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
}
|
||||
|
||||
fn draw_artist_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
match app.data.lidarr_data.artist_history.as_ref() {
|
||||
Some(artist_history) if !app.is_loading => {
|
||||
let current_selection = if artist_history.is_empty() {
|
||||
LidarrHistoryItem::default()
|
||||
} else {
|
||||
artist_history.current_selection().clone()
|
||||
if !app.is_loading {
|
||||
let current_selection = if app.data.lidarr_data.artist_history.is_empty() {
|
||||
LidarrHistoryItem::default()
|
||||
} else {
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.current_selection()
|
||||
.clone()
|
||||
};
|
||||
|
||||
if let Route::Lidarr(active_lidarr_block, _) = app.get_current_route() {
|
||||
let history_row_mapping = |history_item: &LidarrHistoryItem| {
|
||||
let LidarrHistoryItem {
|
||||
source_title,
|
||||
quality,
|
||||
event_type,
|
||||
date,
|
||||
..
|
||||
} = history_item;
|
||||
|
||||
source_title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 40),
|
||||
current_selection == *history_item,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
);
|
||||
|
||||
Row::new(vec![
|
||||
Cell::from(source_title.to_string()),
|
||||
Cell::from(event_type.to_string()),
|
||||
Cell::from(quality.quality.name.to_owned()),
|
||||
Cell::from(date.to_string()),
|
||||
])
|
||||
.primary()
|
||||
};
|
||||
let history_table = ManagarrTable::new(
|
||||
Some(&mut app.data.lidarr_data.artist_history),
|
||||
history_row_mapping,
|
||||
)
|
||||
.block(layout_block_top_border())
|
||||
.loading(app.is_loading)
|
||||
.sorting(active_lidarr_block == ActiveLidarrBlock::ArtistHistorySortPrompt)
|
||||
.searching(active_lidarr_block == ActiveLidarrBlock::SearchArtistHistory)
|
||||
.search_produced_empty_results(
|
||||
active_lidarr_block == ActiveLidarrBlock::SearchArtistHistoryError,
|
||||
)
|
||||
.filtering(active_lidarr_block == ActiveLidarrBlock::FilterArtistHistory)
|
||||
.filter_produced_empty_results(
|
||||
active_lidarr_block == ActiveLidarrBlock::FilterArtistHistoryError,
|
||||
)
|
||||
.headers(["Source Title", "Event Type", "Quality", "Date"])
|
||||
.constraints([
|
||||
Constraint::Percentage(40),
|
||||
Constraint::Percentage(20),
|
||||
Constraint::Percentage(15),
|
||||
Constraint::Percentage(25),
|
||||
]);
|
||||
|
||||
if let Route::Lidarr(active_lidarr_block, _) = app.get_current_route() {
|
||||
let history_row_mapping = |history_item: &LidarrHistoryItem| {
|
||||
let LidarrHistoryItem {
|
||||
source_title,
|
||||
quality,
|
||||
event_type,
|
||||
date,
|
||||
..
|
||||
} = history_item;
|
||||
|
||||
source_title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 40),
|
||||
current_selection == *history_item,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
);
|
||||
|
||||
Row::new(vec![
|
||||
Cell::from(source_title.to_string()),
|
||||
Cell::from(event_type.to_string()),
|
||||
Cell::from(quality.quality.name.to_owned()),
|
||||
Cell::from(date.to_string()),
|
||||
])
|
||||
.primary()
|
||||
};
|
||||
let mut artist_history_table = app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.as_mut()
|
||||
.expect("artist_history must be populated");
|
||||
let history_table =
|
||||
ManagarrTable::new(Some(&mut artist_history_table), history_row_mapping)
|
||||
.block(layout_block_top_border())
|
||||
.loading(app.is_loading)
|
||||
.sorting(active_lidarr_block == ActiveLidarrBlock::ArtistHistorySortPrompt)
|
||||
.searching(active_lidarr_block == ActiveLidarrBlock::SearchArtistHistory)
|
||||
.search_produced_empty_results(
|
||||
active_lidarr_block == ActiveLidarrBlock::SearchArtistHistoryError,
|
||||
)
|
||||
.filtering(active_lidarr_block == ActiveLidarrBlock::FilterArtistHistory)
|
||||
.filter_produced_empty_results(
|
||||
active_lidarr_block == ActiveLidarrBlock::FilterArtistHistoryError,
|
||||
)
|
||||
.headers(["Source Title", "Event Type", "Quality", "Date"])
|
||||
.constraints([
|
||||
Constraint::Percentage(40),
|
||||
Constraint::Percentage(20),
|
||||
Constraint::Percentage(15),
|
||||
Constraint::Percentage(25),
|
||||
]);
|
||||
|
||||
if [
|
||||
ActiveLidarrBlock::SearchArtistHistory,
|
||||
ActiveLidarrBlock::FilterArtistHistory,
|
||||
]
|
||||
.contains(&active_lidarr_block)
|
||||
{
|
||||
history_table.show_cursor(f, area);
|
||||
}
|
||||
|
||||
f.render_widget(history_table, area);
|
||||
if [
|
||||
ActiveLidarrBlock::SearchArtistHistory,
|
||||
ActiveLidarrBlock::FilterArtistHistory,
|
||||
]
|
||||
.contains(&active_lidarr_block)
|
||||
{
|
||||
history_table.show_cursor(f, area);
|
||||
}
|
||||
|
||||
f.render_widget(history_table, area);
|
||||
}
|
||||
_ => f.render_widget(
|
||||
} else {
|
||||
f.render_widget(
|
||||
LoadingBlock::new(
|
||||
app.is_loading || app.data.lidarr_data.albums.is_empty(),
|
||||
layout_block_top_border(),
|
||||
),
|
||||
area,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_artist_history_item_details_popup(f: &mut Frame<'_>, app: &mut App<'_>) {
|
||||
let current_selection =
|
||||
if let Some(artist_history_items) = app.data.lidarr_data.artist_history.as_ref() {
|
||||
if artist_history_items.is_empty() {
|
||||
LidarrHistoryItem::default()
|
||||
} else {
|
||||
artist_history_items.current_selection().clone()
|
||||
}
|
||||
} else {
|
||||
LidarrHistoryItem::default()
|
||||
};
|
||||
let current_selection = if app.data.lidarr_data.artist_history.is_empty() {
|
||||
LidarrHistoryItem::default()
|
||||
} else {
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artist_history
|
||||
.current_selection()
|
||||
.clone()
|
||||
};
|
||||
|
||||
let line_vec = create_history_event_details(current_selection);
|
||||
let text = Text::from(line_vec);
|
||||
@@ -441,3 +447,158 @@ fn draw_artist_history_item_details_popup(f: &mut Frame<'_>, app: &mut App<'_>)
|
||||
|
||||
f.render_widget(Popup::new(message).size(Size::NarrowLongMessage), f.area());
|
||||
}
|
||||
|
||||
fn draw_artist_releases(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
let (current_selection, is_empty) = if app.data.lidarr_data.discography_releases.is_empty() {
|
||||
(LidarrRelease::default(), true)
|
||||
} else {
|
||||
(
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.discography_releases
|
||||
.current_selection()
|
||||
.clone(),
|
||||
app.data.lidarr_data.discography_releases.is_empty(),
|
||||
)
|
||||
};
|
||||
|
||||
if let Route::Lidarr(active_lidarr_block, _) = app.get_current_route() {
|
||||
let release_row_mapping = |release: &LidarrRelease| {
|
||||
let LidarrRelease {
|
||||
protocol,
|
||||
age,
|
||||
title,
|
||||
indexer,
|
||||
size,
|
||||
rejected,
|
||||
seeders,
|
||||
leechers,
|
||||
quality,
|
||||
..
|
||||
} = release;
|
||||
|
||||
let age = format!("{age} days");
|
||||
title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 35),
|
||||
current_selection == *release
|
||||
&& active_lidarr_block != ActiveLidarrBlock::ManualArtistSearchConfirmPrompt,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
);
|
||||
let size = convert_to_gb(*size);
|
||||
let rejected_str = if *rejected { "⛔" } else { "" };
|
||||
let peers = if seeders.is_none() || leechers.is_none() {
|
||||
Text::from("")
|
||||
} else {
|
||||
let seeders = seeders
|
||||
.clone()
|
||||
.unwrap_or(Number::from(0u64))
|
||||
.as_u64()
|
||||
.unwrap();
|
||||
let leechers = leechers
|
||||
.clone()
|
||||
.unwrap_or(Number::from(0u64))
|
||||
.as_u64()
|
||||
.unwrap();
|
||||
|
||||
decorate_peer_style(
|
||||
seeders,
|
||||
leechers,
|
||||
Text::from(format!("{seeders} / {leechers}")),
|
||||
)
|
||||
};
|
||||
|
||||
let quality_name = quality.quality.name.clone();
|
||||
|
||||
Row::new(vec![
|
||||
Cell::from(protocol.clone()),
|
||||
Cell::from(age),
|
||||
Cell::from(rejected_str),
|
||||
Cell::from(title.to_string()),
|
||||
Cell::from(indexer.clone()),
|
||||
Cell::from(format!("{size:.1} GB")),
|
||||
Cell::from(peers),
|
||||
Cell::from(quality_name),
|
||||
])
|
||||
.primary()
|
||||
};
|
||||
let mut release_table = &mut app.data.lidarr_data.discography_releases;
|
||||
let artist_release_table = ManagarrTable::new(Some(&mut release_table), release_row_mapping)
|
||||
.block(layout_block_top_border())
|
||||
.loading(app.is_loading || is_empty)
|
||||
.sorting(active_lidarr_block == ActiveLidarrBlock::ManualArtistSearchSortPrompt)
|
||||
.headers([
|
||||
"Source", "Age", "⛔", "Title", "Indexer", "Size", "Peers", "Quality",
|
||||
])
|
||||
.constraints([
|
||||
Constraint::Length(9),
|
||||
Constraint::Length(10),
|
||||
Constraint::Length(5),
|
||||
Constraint::Percentage(35),
|
||||
Constraint::Percentage(15),
|
||||
Constraint::Length(12),
|
||||
Constraint::Length(12),
|
||||
Constraint::Percentage(10),
|
||||
]);
|
||||
|
||||
f.render_widget(artist_release_table, area);
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_manual_artist_search_confirm_prompt(f: &mut Frame<'_>, app: &mut App<'_>) {
|
||||
let current_selection = app
|
||||
.data
|
||||
.lidarr_data
|
||||
.discography_releases
|
||||
.current_selection();
|
||||
let title = if current_selection.rejected {
|
||||
"Download Rejected Release"
|
||||
} else {
|
||||
"Download Release"
|
||||
};
|
||||
let prompt = if current_selection.rejected {
|
||||
format!(
|
||||
"Do you really want to download the rejected release: {}?",
|
||||
¤t_selection.title.text
|
||||
)
|
||||
} else {
|
||||
format!(
|
||||
"Do you want to download the release: {}?",
|
||||
¤t_selection.title.text
|
||||
)
|
||||
};
|
||||
|
||||
if current_selection.rejected {
|
||||
let mut lines_vec = vec![Line::from("Rejection reasons: ".primary().bold())];
|
||||
let mut rejections_spans = current_selection
|
||||
.rejections
|
||||
.clone()
|
||||
.unwrap_or_default()
|
||||
.iter()
|
||||
.map(|item| Line::from(format!("• {item}").primary().bold()))
|
||||
.collect::<Vec<Line<'_>>>();
|
||||
lines_vec.append(&mut rejections_spans);
|
||||
|
||||
let content_paragraph = Paragraph::new(lines_vec)
|
||||
.block(borderless_block())
|
||||
.wrap(Wrap { trim: false })
|
||||
.left_aligned();
|
||||
let confirmation_prompt = ConfirmationPrompt::new()
|
||||
.title(title)
|
||||
.prompt(&prompt)
|
||||
.content(content_paragraph)
|
||||
.yes_no_value(app.data.lidarr_data.prompt_confirm);
|
||||
|
||||
f.render_widget(Popup::new(confirmation_prompt).size(Size::Small), f.area());
|
||||
} else {
|
||||
let confirmation_prompt = ConfirmationPrompt::new()
|
||||
.title(title)
|
||||
.prompt(&prompt)
|
||||
.yes_no_value(app.data.lidarr_data.prompt_confirm);
|
||||
|
||||
f.render_widget(
|
||||
Popup::new(confirmation_prompt).size(Size::MediumPrompt),
|
||||
f.area(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,18 +38,23 @@ mod tests {
|
||||
#[rstest]
|
||||
#[case(ActiveLidarrBlock::ArtistDetails, 0)]
|
||||
#[case(ActiveLidarrBlock::ArtistHistory, 1)]
|
||||
#[case(ActiveLidarrBlock::ManualArtistSearch, 2)]
|
||||
#[case(ActiveLidarrBlock::SearchAlbums, 0)]
|
||||
#[case(ActiveLidarrBlock::SearchAlbumsError, 0)]
|
||||
#[case(ActiveLidarrBlock::UpdateAndScanArtistPrompt, 0)]
|
||||
#[case(ActiveLidarrBlock::UpdateAndScanArtistPrompt, 1)]
|
||||
#[case(ActiveLidarrBlock::UpdateAndScanArtistPrompt, 2)]
|
||||
#[case(ActiveLidarrBlock::AutomaticallySearchArtistPrompt, 0)]
|
||||
#[case(ActiveLidarrBlock::AutomaticallySearchArtistPrompt, 1)]
|
||||
#[case(ActiveLidarrBlock::AutomaticallySearchArtistPrompt, 2)]
|
||||
#[case(ActiveLidarrBlock::SearchArtistHistory, 1)]
|
||||
#[case(ActiveLidarrBlock::SearchArtistHistoryError, 1)]
|
||||
#[case(ActiveLidarrBlock::FilterArtistHistory, 1)]
|
||||
#[case(ActiveLidarrBlock::FilterArtistHistoryError, 1)]
|
||||
#[case(ActiveLidarrBlock::ArtistHistorySortPrompt, 1)]
|
||||
#[case(ActiveLidarrBlock::ArtistHistoryDetails, 1)]
|
||||
#[case(ActiveLidarrBlock::ManualArtistSearchConfirmPrompt, 2)]
|
||||
#[case(ActiveLidarrBlock::ManualArtistSearchSortPrompt, 2)]
|
||||
fn test_artist_details_ui_renders(
|
||||
#[case] active_lidarr_block: ActiveLidarrBlock,
|
||||
#[case] index: usize,
|
||||
@@ -71,6 +76,7 @@ mod tests {
|
||||
#[rstest]
|
||||
#[case(ActiveLidarrBlock::ArtistDetails, 0)]
|
||||
#[case(ActiveLidarrBlock::ArtistHistory, 1)]
|
||||
#[case(ActiveLidarrBlock::ManualArtistSearch, 2)]
|
||||
fn test_artist_details_ui_renders_artist_details_loading(
|
||||
#[case] active_lidarr_block: ActiveLidarrBlock,
|
||||
#[case] index: usize,
|
||||
@@ -94,12 +100,14 @@ mod tests {
|
||||
#[case(ActiveLidarrBlock::ArtistDetails, 0)]
|
||||
#[case(ActiveLidarrBlock::ArtistHistory, 1)]
|
||||
#[case(ActiveLidarrBlock::ArtistHistoryDetails, 1)]
|
||||
#[case(ActiveLidarrBlock::ManualArtistSearch, 2)]
|
||||
fn test_artist_details_ui_renders_artist_details_empty(
|
||||
#[case] active_lidarr_block: ActiveLidarrBlock,
|
||||
#[case] index: usize,
|
||||
) {
|
||||
let mut app = App::test_default_fully_populated();
|
||||
app.data.lidarr_data.albums = StatefulTable::default();
|
||||
app.data.lidarr_data.discography_releases = StatefulTable::default();
|
||||
app.push_navigation_stack(active_lidarr_block.into());
|
||||
app.data.lidarr_data.artist_info_tabs.set_index(index);
|
||||
|
||||
|
||||
@@ -280,19 +280,34 @@ mod tests {
|
||||
insta::assert_snapshot!(output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_library_ui_renders_edit_artist_over_artist_details() {
|
||||
#[rstest]
|
||||
#[case(ActiveLidarrBlock::ArtistDetails, 0)]
|
||||
#[case(ActiveLidarrBlock::ArtistHistory, 1)]
|
||||
#[case(ActiveLidarrBlock::ManualArtistSearch, 2)]
|
||||
fn test_library_ui_renders_edit_artist_over_artist_details(
|
||||
#[case] active_lidarr_block: ActiveLidarrBlock,
|
||||
#[case] index: usize,
|
||||
) {
|
||||
let mut app = App::test_default_fully_populated();
|
||||
app.push_navigation_stack(ActiveLidarrBlock::Artists.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistDetails.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::EditArtistPrompt.into());
|
||||
app.push_navigation_stack(
|
||||
(
|
||||
ActiveLidarrBlock::EditArtistPrompt,
|
||||
Some(active_lidarr_block),
|
||||
)
|
||||
.into(),
|
||||
);
|
||||
app.data.lidarr_data.artist_info_tabs.set_index(index);
|
||||
app.data.lidarr_data.selected_block = BlockSelectionState::new(EDIT_ARTIST_SELECTION_BLOCKS);
|
||||
|
||||
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||
LibraryUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
insta::assert_snapshot!(output);
|
||||
insta::assert_snapshot!(
|
||||
format!("edit_artist_renders_over_{active_lidarr_block}"),
|
||||
output
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭─────────────────────────────────── Details ───────────────────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │Source Title: Test source title │ │
|
||||
│╭ Artist Details ─────────────│Event Type: grabbed │───────────────────────────────╮│
|
||||
││ Albums │ History │Quality: Lossless │ ││
|
||||
││ Albums │ History │ Manual Sear│Quality: Lossless │ ││
|
||||
││───────────────────────────────│Date: 2023-01-01 00:00:00 UTC │───────────────────────────────││
|
||||
││ Source Title ▼ │Indexer: │ ││
|
||||
││=> Test source title │NZB Info URL: │-01-01 00:00:00 UTC ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Title Event Type Quality Date ││
|
||||
││=> Test source title grabbed Lossless 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Title ▼ Event Type Quality Date ││
|
||||
││=> Test source title grabbed Lossless 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭──────────────── Automatic Artist Search ────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │Do you want to trigger an automatic search of your indexers│ │
|
||||
│╭ Artist Details ───────────────────────│ for all monitored album(s) for the artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ │ ││
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭──────────────── Automatic Artist Search ────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │Do you want to trigger an automatic search of your indexers│ │
|
||||
│╭ Artist Details ───────────────────────│ for all monitored album(s) for the artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ │ ││
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Source Title ▼ │ │ Date ││
|
||||
││=> Test source title │ │ 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/artist_details_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: American pianist │
|
||||
│Type: Person │
|
||||
│Status: Continuing │
|
||||
│Genres: soundtrack │
|
||||
│Rating: 84% │
|
||||
│Path: /nfs/music/test-artist │
|
||||
│Quality Profile: Lossless │
|
||||
│Metadata Profile: Standard │
|
||||
│Monitored: Yes │
|
||||
│Albums: 1 │
|
||||
│Tracks: 15/15 ╭──────────────── Automatic Artist Search ────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │Do you want to trigger an automatic search of your indexers│ │
|
||||
│╭ Artist Details ───────────────────────│ for all monitored album(s) for the artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Source ▼ Age ⛔ Title │ │ Size Peers Quality ││
|
||||
││=> torrent 1 days ⛔ Test Releas│ │ 0.0 GB 2 / 1 Lossless ││
|
||||
││ usenet 1 days ⛔ Test Releas│ │ 0.0 GB Lossless ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭────────────────────────────╮╭───────────────────────────╮│ ││
|
||||
││ ││ Yes ││ No ││ ││
|
||||
││ │╰────────────────────────────╯╰───────────────────────────╯│ ││
|
||||
││ ╰───────────────────────────────────────────────────────────╯ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Title ▼ Event Type Quality Date ││
|
||||
││=> Test source title grabbed Lossless 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Title ▼ Event Type Quality Date ││
|
||||
││=> Test source title grabbed Lossless 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/artist_details_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: American pianist │
|
||||
│Type: Person │
|
||||
│Status: Continuing │
|
||||
│Genres: soundtrack │
|
||||
│Rating: 84% │
|
||||
│Path: /nfs/music/test-artist │
|
||||
│Quality Profile: Lossless │
|
||||
│Metadata Profile: Standard │
|
||||
│Monitored: Yes │
|
||||
│Albums: 1 ╭───────────────── Download Rejected Release ──────────────────╮ │
|
||||
│Tracks: 15/15 │ Do you really want to download the rejected release: Test │ │
|
||||
│Size on Disk: 0.00 GB │ Release? │ │
|
||||
│╭ Artist Details ──────────────────────│ │───────────────────────────────────────╮│
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││────────────────────────────────────────│Rejection reasons: │───────────────────────────────────────││
|
||||
││ Source ▼ Age ⛔ Title │• Unknown quality profile │e Peers Quality ││
|
||||
││=> torrent 1 days ⛔ Test Relea│• Release is already mapped │ GB 2 / 1 Lossless ││
|
||||
││ usenet 1 days ⛔ Test Relea│ │ GB Lossless ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭──────────────────────────────╮╭──────────────────────────────╮│ ││
|
||||
││ ││ Yes ││ No ││ ││
|
||||
││ │╰──────────────────────────────╯╰──────────────────────────────╯│ ││
|
||||
││ ╰────────────────────────────────────────────────────────────────╯ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/artist_details_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: American pianist │
|
||||
│Type: Person │
|
||||
│Status: Continuing │
|
||||
│Genres: soundtrack │
|
||||
│Rating: 84% │
|
||||
│Path: /nfs/music/test-artist │
|
||||
│Quality Profile: Lossless │
|
||||
│Metadata Profile: Standard │
|
||||
│Monitored: Yes │
|
||||
│Albums: 1 │
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Age ⛔ Title Indexer Size Peers Quality ││
|
||||
││=> torrent 1 days ⛔ Test Release kickass torrents 0.0 GB 2 / 1 Lossless ││
|
||||
││ usenet 1 days ⛔ Test Release DrunkenSlug 0.0 GB Lossless ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ╭───────────────────────────╮ ││
|
||||
││ │Something │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ ╰───────────────────────────╯ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/artist_details_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: American pianist │
|
||||
│Type: Person │
|
||||
│Status: Continuing │
|
||||
│Genres: soundtrack │
|
||||
│Rating: 84% │
|
||||
│Path: /nfs/music/test-artist │
|
||||
│Quality Profile: Lossless │
|
||||
│Metadata Profile: Standard │
|
||||
│Monitored: Yes │
|
||||
│Albums: 1 │
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source ▼ Age ⛔ Title Indexer Size Peers Quality ││
|
||||
││=> torrent 1 days ⛔ Test Release kickass torrents 0.0 GB 2 / 1 Lossless ││
|
||||
││ usenet 1 days ⛔ Test Release DrunkenSlug 0.0 GB Lossless ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Title ▼ Event Type Quality Date ││
|
||||
││=> Test source title grabbed Lossless 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Title ▼ Event Type Quality Date ││
|
||||
││=> Test source title grabbed Lossless 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭──────────────────── Update and Scan ────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │ Do you want to trigger an update and disk scan for the │ │
|
||||
│╭ Artist Details ───────────────────────│ artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ │ ││
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭──────────────────── Update and Scan ────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │ Do you want to trigger an update and disk scan for the │ │
|
||||
│╭ Artist Details ───────────────────────│ artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ │ ││
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Source Title ▼ │ │ Date ││
|
||||
││=> Test source title │ │ 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/artist_details_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: American pianist │
|
||||
│Type: Person │
|
||||
│Status: Continuing │
|
||||
│Genres: soundtrack │
|
||||
│Rating: 84% │
|
||||
│Path: /nfs/music/test-artist │
|
||||
│Quality Profile: Lossless │
|
||||
│Metadata Profile: Standard │
|
||||
│Monitored: Yes │
|
||||
│Albums: 1 │
|
||||
│Tracks: 15/15 ╭──────────────────── Update and Scan ────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │ Do you want to trigger an update and disk scan for the │ │
|
||||
│╭ Artist Details ───────────────────────│ artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Source ▼ Age ⛔ Title │ │ Size Peers Quality ││
|
||||
││=> torrent 1 days ⛔ Test Releas│ │ 0.0 GB 2 / 1 Lossless ││
|
||||
││ usenet 1 days ⛔ Test Releas│ │ 0.0 GB Lossless ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭────────────────────────────╮╭───────────────────────────╮│ ││
|
||||
││ ││ Yes ││ No ││ ││
|
||||
││ │╰────────────────────────────╯╰───────────────────────────╯│ ││
|
||||
││ ╰───────────────────────────────────────────────────────────╯ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭──────────────── Automatic Artist Search ────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │Do you want to trigger an automatic search of your indexers│ │
|
||||
│╭ Artist Details ───────────────────────│ for all monitored album(s) for the artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ │ ││
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭───────────────────── Delete Album ──────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │ Do you really want to delete the album: │ │
|
||||
│╭ Artist Details ───────────────────────│ Test Album? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ │ ││
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ ╭───╮ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ Delete Album Files: │ ✔ │ │ 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭──────────────────── Update and Scan ────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │ Do you want to trigger an update and disk scan for the │ │
|
||||
│╭ Artist Details ───────────────────────│ artist: Alex? │───────────────────────────────────────────╮│
|
||||
││ Albums │ History │ │ ││
|
||||
││ Albums │ History │ Manual Search │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ ││
|
||||
││ ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Source Title ▼ Event Type Quality Date ││
|
||||
││=> Test source title grabbed Lossless 2023-01-01 00:00:00 UTC ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 ╭─────────────────────────────────── Details ───────────────────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │Source Title: Test source title │ │
|
||||
│╭ Artist Details ─────────────│Event Type: grabbed │───────────────────────────────╮│
|
||||
││ Albums │ History │Quality: Lossless │ ││
|
||||
││ Albums │ History │ Manual Sear│Quality: Lossless │ ││
|
||||
││───────────────────────────────│Date: 2023-01-01 00:00:00 UTC │───────────────────────────────││
|
||||
││ Source Title ▼ │Indexer: │ ││
|
||||
││=> Test source title │NZB Info URL: │-01-01 00:00:00 UTC ││
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/artist_details_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: American pianist │
|
||||
│Type: Person │
|
||||
│Status: Continuing │
|
||||
│Genres: soundtrack │
|
||||
│Rating: 84% │
|
||||
│Path: /nfs/music/test-artist │
|
||||
│Quality Profile: Lossless │
|
||||
│Metadata Profile: Standard │
|
||||
│Monitored: Yes │
|
||||
│Albums: 1 │
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ ││
|
||||
││ ││
|
||||
││ Loading ... ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ ││
|
||||
││ ││
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ ││
|
||||
││ ││
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/artist_details_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: American pianist │
|
||||
│Type: Person │
|
||||
│Status: Continuing │
|
||||
│Genres: soundtrack │
|
||||
│Rating: 84% │
|
||||
│Path: /nfs/music/test-artist │
|
||||
│Quality Profile: Lossless │
|
||||
│Metadata Profile: Standard │
|
||||
│Monitored: Yes │
|
||||
│Albums: 1 │
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ ││
|
||||
││ ││
|
||||
││ Loading ... ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/library_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: Ame╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮ │
|
||||
│Type: Person │ │ │
|
||||
│Status: Continuing │ │ │
|
||||
│Genres: soundtrack │ │ │
|
||||
│Rating: 84% │ │ │
|
||||
│Path: /nfs/music/te│ │ │
|
||||
│Quality Profile: Lo│ │ │
|
||||
│Metadata Profile: S│ │ │
|
||||
│Monitored: Yes │ │ │
|
||||
│Albums: 1 │ ╭───╮ │ │
|
||||
│Tracks: 15/15 │ Monitored: │ ✔ │ │ │
|
||||
│Size on Disk: 0.00 │ ╰───╯ │ │
|
||||
│╭ Artist Details │ ╭─────────────────────────────────────────────────╮ │────────────────────╮│
|
||||
││ Albums │ History │ Monitor New Albums: │All Albums ▼ │ │ ││
|
||||
││──────────────────│ ╰─────────────────────────────────────────────────╯ │────────────────────││
|
||||
││ Monitored Titl│ ╭─────────────────────────────────────────────────╮ │ize ││
|
||||
││=> 🏷 Test│ Quality Profile: │Lossless ▼ │ │.00 GB ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Metadata Profile: │Standard ▼ │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Path: │/nfs/music │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Tags: │alex │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ ││
|
||||
││ ││ Save ││ Cancel ││ ││
|
||||
││ │╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│ ││
|
||||
││ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/library_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: Ame╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮ │
|
||||
│Type: Person │ │ │
|
||||
│Status: Continuing │ │ │
|
||||
│Genres: soundtrack │ │ │
|
||||
│Rating: 84% │ │ │
|
||||
│Path: /nfs/music/te│ │ │
|
||||
│Quality Profile: Lo│ │ │
|
||||
│Metadata Profile: S│ │ │
|
||||
│Monitored: Yes │ │ │
|
||||
│Albums: 1 │ ╭───╮ │ │
|
||||
│Tracks: 15/15 │ Monitored: │ ✔ │ │ │
|
||||
│Size on Disk: 0.00 │ ╰───╯ │ │
|
||||
│╭ Artist Details │ ╭─────────────────────────────────────────────────╮ │────────────────────╮│
|
||||
││ Albums │ History │ Monitor New Albums: │All Albums ▼ │ │ ││
|
||||
││──────────────────│ ╰─────────────────────────────────────────────────╯ │────────────────────││
|
||||
││ Source Title ▼ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││=> Test source tit│ Quality Profile: │Lossless ▼ │ │0:00 UTC ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Metadata Profile: │Standard ▼ │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Path: │/nfs/music │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Tags: │alex │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ ││
|
||||
││ ││ Save ││ Cancel ││ ││
|
||||
││ │╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│ ││
|
||||
││ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/library_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
╭ Alex ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│Artist: Alex │
|
||||
│Overview: some interesting description of the artist │
|
||||
│Disambiguation: Ame╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮ │
|
||||
│Type: Person │ │ │
|
||||
│Status: Continuing │ │ │
|
||||
│Genres: soundtrack │ │ │
|
||||
│Rating: 84% │ │ │
|
||||
│Path: /nfs/music/te│ │ │
|
||||
│Quality Profile: Lo│ │ │
|
||||
│Metadata Profile: S│ │ │
|
||||
│Monitored: Yes │ │ │
|
||||
│Albums: 1 │ ╭───╮ │ │
|
||||
│Tracks: 15/15 │ Monitored: │ ✔ │ │ │
|
||||
│Size on Disk: 0.00 │ ╰───╯ │ │
|
||||
│╭ Artist Details │ ╭─────────────────────────────────────────────────╮ │────────────────────╮│
|
||||
││ Albums │ History │ Monitor New Albums: │All Albums ▼ │ │ ││
|
||||
││──────────────────│ ╰─────────────────────────────────────────────────╯ │────────────────────││
|
||||
││ Source ▼ Age │ ╭─────────────────────────────────────────────────╮ │ Quality ││
|
||||
││=> torrent 1 day│ Quality Profile: │Lossless ▼ │ │ Lossless ││
|
||||
││ usenet 1 day│ ╰─────────────────────────────────────────────────╯ │ Lossless ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Metadata Profile: │Standard ▼ │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Path: │/nfs/music │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ ╭─────────────────────────────────────────────────╮ │ ││
|
||||
││ │ Tags: │alex │ │ ││
|
||||
││ │ ╰─────────────────────────────────────────────────╯ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ ││
|
||||
││ ││ Save ││ Cancel ││ ││
|
||||
││ │╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│ ││
|
||||
││ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -21,7 +21,7 @@ expression: output
|
||||
│Tracks: 15/15 │
|
||||
│Size on Disk: 0.00 GB │
|
||||
│╭ Artist Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
|
||||
││ Albums │ History ││
|
||||
││ Albums │ History │ Manual Search ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
|
||||
Reference in New Issue
Block a user