feat: Completed support for viewing Lidarr artist details
This commit is contained in:
@@ -0,0 +1,327 @@
|
||||
use chrono::Utc;
|
||||
use deunicode::deunicode;
|
||||
use ratatui::Frame;
|
||||
use ratatui::layout::{Constraint, Layout, Rect};
|
||||
use ratatui::style::Stylize;
|
||||
use ratatui::text::Line;
|
||||
use ratatui::widgets::{Cell, Paragraph, Row, Wrap};
|
||||
use regex::Regex;
|
||||
|
||||
use crate::app::App;
|
||||
use crate::models::Route;
|
||||
use crate::models::lidarr_models::Album;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{ARTIST_DETAILS_BLOCKS, ActiveLidarrBlock};
|
||||
use crate::ui::styles::ManagarrStyle;
|
||||
use crate::ui::utils::{
|
||||
borderless_block, get_width_from_percentage, layout_block_top_border, title_block,
|
||||
};
|
||||
use crate::ui::widgets::confirmation_prompt::ConfirmationPrompt;
|
||||
use crate::ui::widgets::managarr_table::ManagarrTable;
|
||||
use crate::ui::widgets::popup::{Popup, Size};
|
||||
use crate::ui::{DrawUi, draw_popup, draw_tabs};
|
||||
use crate::utils::convert_to_gb;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "artist_details_ui_tests.rs"]
|
||||
mod artist_details_ui_tests;
|
||||
|
||||
pub(super) struct ArtistDetailsUi;
|
||||
|
||||
impl DrawUi for ArtistDetailsUi {
|
||||
fn accepts(route: Route) -> bool {
|
||||
let Route::Lidarr(active_lidarr_block, _) = route else {
|
||||
return false;
|
||||
};
|
||||
ARTIST_DETAILS_BLOCKS.contains(&active_lidarr_block)
|
||||
}
|
||||
|
||||
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, _area: Rect) {
|
||||
let route = app.get_current_route();
|
||||
if let Route::Lidarr(active_lidarr_block, _) = route {
|
||||
let draw_artist_details_popup = |f: &mut Frame<'_>, app: &mut App<'_>, popup_area: Rect| {
|
||||
f.render_widget(
|
||||
title_block(
|
||||
&app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artists
|
||||
.current_selection()
|
||||
.artist_name
|
||||
.text,
|
||||
),
|
||||
popup_area,
|
||||
);
|
||||
let [description_area, detail_area] =
|
||||
Layout::vertical([Constraint::Percentage(37), Constraint::Fill(0)])
|
||||
.margin(1)
|
||||
.areas(popup_area);
|
||||
draw_artist_description(f, app, description_area);
|
||||
let content_area = draw_tabs(
|
||||
f,
|
||||
detail_area,
|
||||
"Artist Details",
|
||||
&app.data.lidarr_data.artist_info_tabs,
|
||||
);
|
||||
draw_artist_details(f, app, content_area);
|
||||
|
||||
match active_lidarr_block {
|
||||
ActiveLidarrBlock::AutomaticallySearchArtistPrompt => {
|
||||
let prompt = format!(
|
||||
"Do you want to trigger an automatic search of your indexers for all monitored album(s) for the artist: {}?",
|
||||
app.data.lidarr_data.artists.current_selection().artist_name
|
||||
);
|
||||
let confirmation_prompt = ConfirmationPrompt::new()
|
||||
.title("Automatic Artist Search")
|
||||
.prompt(&prompt)
|
||||
.yes_no_value(app.data.lidarr_data.prompt_confirm);
|
||||
|
||||
f.render_widget(
|
||||
Popup::new(confirmation_prompt).size(Size::MediumPrompt),
|
||||
f.area(),
|
||||
);
|
||||
}
|
||||
ActiveLidarrBlock::UpdateAndScanArtistPrompt => {
|
||||
let prompt = format!(
|
||||
"Do you want to trigger an update and disk scan for the artist: {}?",
|
||||
app.data.lidarr_data.artists.current_selection().artist_name
|
||||
);
|
||||
let confirmation_prompt = ConfirmationPrompt::new()
|
||||
.title("Update and Scan")
|
||||
.prompt(&prompt)
|
||||
.yes_no_value(app.data.lidarr_data.prompt_confirm);
|
||||
|
||||
f.render_widget(
|
||||
Popup::new(confirmation_prompt).size(Size::MediumPrompt),
|
||||
f.area(),
|
||||
);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
};
|
||||
|
||||
draw_popup(f, app, draw_artist_details_popup, Size::XXLarge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_artist_description(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
let current_selection = app.data.lidarr_data.artists.current_selection();
|
||||
let monitored = if current_selection.monitored {
|
||||
"Yes"
|
||||
} else {
|
||||
"No"
|
||||
};
|
||||
let quality_profile = app
|
||||
.data
|
||||
.lidarr_data
|
||||
.quality_profile_map
|
||||
.get_by_left(¤t_selection.quality_profile_id)
|
||||
.cloned()
|
||||
.unwrap_or_default();
|
||||
let metadata_profile = app
|
||||
.data
|
||||
.lidarr_data
|
||||
.metadata_profile_map
|
||||
.get_by_left(¤t_selection.metadata_profile_id)
|
||||
.cloned()
|
||||
.unwrap_or_default();
|
||||
let overview = Regex::new(r"[\r\n\t]")
|
||||
.unwrap()
|
||||
.replace_all(
|
||||
&deunicode(
|
||||
current_selection
|
||||
.overview
|
||||
.as_ref()
|
||||
.unwrap_or(&String::new()),
|
||||
),
|
||||
"",
|
||||
)
|
||||
.to_string();
|
||||
|
||||
let mut artist_description = vec![
|
||||
Line::from(vec![
|
||||
"Artist: ".primary().bold(),
|
||||
current_selection.artist_name.text.clone().primary().bold(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Overview: ".primary().bold(),
|
||||
overview.default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Disambiguation: ".primary().bold(),
|
||||
current_selection
|
||||
.disambiguation
|
||||
.clone()
|
||||
.unwrap_or_default()
|
||||
.default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Type: ".primary().bold(),
|
||||
current_selection
|
||||
.artist_type
|
||||
.clone()
|
||||
.unwrap_or_default()
|
||||
.default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Status: ".primary().bold(),
|
||||
current_selection.status.to_display_str().default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Genres: ".primary().bold(),
|
||||
current_selection.genres.join(", ").default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Rating: ".primary().bold(),
|
||||
current_selection
|
||||
.ratings
|
||||
.as_ref()
|
||||
.map_or_else(
|
||||
|| "N/A".to_owned(),
|
||||
|r| format!("{}%", (r.value * 10.0) as i32),
|
||||
)
|
||||
.default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Path: ".primary().bold(),
|
||||
current_selection.path.clone().default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Quality Profile: ".primary().bold(),
|
||||
quality_profile.default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Metadata Profile: ".primary().bold(),
|
||||
metadata_profile.default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Monitored: ".primary().bold(),
|
||||
monitored.default_color(),
|
||||
]),
|
||||
];
|
||||
|
||||
if let Some(stats) = current_selection.statistics.as_ref() {
|
||||
let size = convert_to_gb(stats.size_on_disk);
|
||||
artist_description.extend(vec![
|
||||
Line::from(vec![
|
||||
"Albums: ".primary().bold(),
|
||||
stats.album_count.to_string().default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Tracks: ".primary().bold(),
|
||||
format!("{}/{}", stats.track_file_count, stats.total_track_count).default_color(),
|
||||
]),
|
||||
Line::from(vec![
|
||||
"Size on Disk: ".primary().bold(),
|
||||
format!("{size:.2} GB").default_color(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
let description_paragraph = Paragraph::new(artist_description)
|
||||
.block(borderless_block())
|
||||
.wrap(Wrap { trim: true });
|
||||
f.render_widget(description_paragraph, area);
|
||||
}
|
||||
|
||||
fn draw_artist_details(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
if let Route::Lidarr(active_lidarr_block, _) =
|
||||
app.data.lidarr_data.artist_info_tabs.get_active_route()
|
||||
{
|
||||
match active_lidarr_block {
|
||||
ActiveLidarrBlock::ArtistDetails => draw_albums_table(f, app, area),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_albums_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
if let Route::Lidarr(active_lidarr_block, _) = app.get_current_route() {
|
||||
let current_selection = if app.data.lidarr_data.albums.is_empty() {
|
||||
Album::default()
|
||||
} else {
|
||||
app.data.lidarr_data.albums.current_selection().clone()
|
||||
};
|
||||
let content = Some(&mut app.data.lidarr_data.albums);
|
||||
let album_row_mapping = |album: &Album| {
|
||||
album.title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 33),
|
||||
*album == current_selection,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
);
|
||||
let monitored = if album.monitored { "🏷" } else { "" };
|
||||
let album_type = album.album_type.clone().unwrap_or_default();
|
||||
let release_date = album
|
||||
.release_date
|
||||
.map_or_else(|| "N/A".to_owned(), |d| d.format("%Y-%m-%d").to_string());
|
||||
let track_count = album.statistics.as_ref().map_or_else(
|
||||
|| "0/0".to_owned(),
|
||||
|s| format!("{}/{}", s.track_file_count, s.total_track_count),
|
||||
);
|
||||
let size = album
|
||||
.statistics
|
||||
.as_ref()
|
||||
.map_or(0f64, |s| convert_to_gb(s.size_on_disk));
|
||||
let duration_mins = album.duration / 60000;
|
||||
|
||||
let row = Row::new(vec![
|
||||
Cell::from(monitored.to_owned()),
|
||||
Cell::from(album.title.to_string()),
|
||||
Cell::from(album_type),
|
||||
Cell::from(track_count),
|
||||
Cell::from(format!("{duration_mins} min")),
|
||||
Cell::from(release_date),
|
||||
Cell::from(format!("{size:.2} GB")),
|
||||
]);
|
||||
|
||||
if !album.monitored {
|
||||
row.unmonitored()
|
||||
} else if let Some(stats) = album.statistics.as_ref() {
|
||||
if stats.track_file_count == stats.total_track_count && stats.total_track_count > 0 {
|
||||
row.downloaded()
|
||||
} else if let Some(release_date) = album.release_date.as_ref() {
|
||||
if release_date > &Utc::now() {
|
||||
row.unreleased()
|
||||
} else {
|
||||
row.missing()
|
||||
}
|
||||
} else {
|
||||
row.missing()
|
||||
}
|
||||
} else {
|
||||
row.indeterminate()
|
||||
}
|
||||
};
|
||||
|
||||
let is_searching = active_lidarr_block == ActiveLidarrBlock::SearchAlbums;
|
||||
let album_table = ManagarrTable::new(content, album_row_mapping)
|
||||
.block(layout_block_top_border())
|
||||
.loading(app.is_loading)
|
||||
.searching(is_searching)
|
||||
.search_produced_empty_results(active_lidarr_block == ActiveLidarrBlock::SearchAlbumsError)
|
||||
.headers([
|
||||
"Monitored",
|
||||
"Title",
|
||||
"Type",
|
||||
"Tracks",
|
||||
"Duration",
|
||||
"Release Date",
|
||||
"Size",
|
||||
])
|
||||
.constraints([
|
||||
Constraint::Percentage(7),
|
||||
Constraint::Percentage(35),
|
||||
Constraint::Percentage(10),
|
||||
Constraint::Percentage(10),
|
||||
Constraint::Percentage(10),
|
||||
Constraint::Percentage(13),
|
||||
Constraint::Percentage(15),
|
||||
]);
|
||||
|
||||
if is_searching {
|
||||
album_table.show_cursor(f, area);
|
||||
}
|
||||
|
||||
f.render_widget(album_table, area);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ARTIST_DETAILS_BLOCKS, ActiveLidarrBlock,
|
||||
};
|
||||
use crate::ui::DrawUi;
|
||||
use crate::ui::lidarr_ui::library::artist_details_ui::ArtistDetailsUi;
|
||||
|
||||
#[test]
|
||||
fn test_artist_details_ui_accepts() {
|
||||
let mut blocks = ARTIST_DETAILS_BLOCKS.clone().to_vec();
|
||||
ActiveLidarrBlock::iter().for_each(|active_lidarr_block| {
|
||||
if blocks.contains(&active_lidarr_block) {
|
||||
assert!(ArtistDetailsUi::accepts(active_lidarr_block.into()));
|
||||
} else {
|
||||
assert!(!ArtistDetailsUi::accepts(active_lidarr_block.into()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mod snapshot_tests {
|
||||
use rstest::rstest;
|
||||
|
||||
use crate::app::App;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::stateful_table::StatefulTable;
|
||||
use crate::ui::DrawUi;
|
||||
use crate::ui::lidarr_ui::library::artist_details_ui::ArtistDetailsUi;
|
||||
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
|
||||
|
||||
#[rstest]
|
||||
#[case(ActiveLidarrBlock::ArtistDetails, 0)]
|
||||
#[case(ActiveLidarrBlock::SearchAlbums, 0)]
|
||||
#[case(ActiveLidarrBlock::SearchAlbumsError, 0)]
|
||||
#[case(ActiveLidarrBlock::UpdateAndScanArtistPrompt, 0)]
|
||||
#[case(ActiveLidarrBlock::AutomaticallySearchArtistPrompt, 0)]
|
||||
fn test_artist_details_ui_renders(
|
||||
#[case] active_lidarr_block: ActiveLidarrBlock,
|
||||
#[case] index: usize,
|
||||
) {
|
||||
let mut app = App::test_default_fully_populated();
|
||||
app.push_navigation_stack(active_lidarr_block.into());
|
||||
app.data.lidarr_data.artist_info_tabs.set_index(index);
|
||||
|
||||
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||
ArtistDetailsUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
insta::assert_snapshot!(
|
||||
format!("artist_details_{active_lidarr_block}_{index}"),
|
||||
output
|
||||
);
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
#[case(ActiveLidarrBlock::ArtistDetails, 0)]
|
||||
fn test_artist_details_ui_renders_artist_details_loading(
|
||||
#[case] active_lidarr_block: ActiveLidarrBlock,
|
||||
#[case] index: usize,
|
||||
) {
|
||||
let mut app = App::test_default_fully_populated();
|
||||
app.push_navigation_stack(active_lidarr_block.into());
|
||||
app.data.lidarr_data.artist_info_tabs.set_index(index);
|
||||
app.is_loading = true;
|
||||
|
||||
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||
ArtistDetailsUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
insta::assert_snapshot!(
|
||||
format!("loading_artist_details_{active_lidarr_block}"),
|
||||
output
|
||||
);
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
#[case(ActiveLidarrBlock::ArtistDetails, 0)]
|
||||
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.push_navigation_stack(active_lidarr_block.into());
|
||||
app.data.lidarr_data.artist_info_tabs.set_index(index);
|
||||
|
||||
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||
ArtistDetailsUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
insta::assert_snapshot!(
|
||||
format!("empty_artist_details_{active_lidarr_block}"),
|
||||
output
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_artist_details_ui_renders_update_and_scan_prompt_over_artist_details() {
|
||||
let mut app = App::test_default_fully_populated();
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistDetails.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::UpdateAndScanArtistPrompt.into());
|
||||
|
||||
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||
ArtistDetailsUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
insta::assert_snapshot!(output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_artist_details_ui_renders_automatic_search_prompt_over_artist_details() {
|
||||
let mut app = App::test_default_fully_populated();
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistDetails.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::AutomaticallySearchArtistPrompt.into());
|
||||
|
||||
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||
ArtistDetailsUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
insta::assert_snapshot!(output);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,13 @@ use ratatui::widgets::ListItem;
|
||||
|
||||
use crate::app::App;
|
||||
use crate::models::Route;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{ActiveLidarrBlock, EDIT_ARTIST_BLOCKS};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ARTIST_DETAILS_BLOCKS, ActiveLidarrBlock, EDIT_ARTIST_BLOCKS,
|
||||
};
|
||||
use crate::models::servarr_data::lidarr::modals::EditArtistModal;
|
||||
use crate::render_selectable_input_box;
|
||||
|
||||
use crate::ui::lidarr_ui::library::artist_details_ui::ArtistDetailsUi;
|
||||
use crate::ui::utils::title_block_centered;
|
||||
use crate::ui::widgets::button::Button;
|
||||
use crate::ui::widgets::checkbox::Checkbox;
|
||||
@@ -34,7 +37,13 @@ impl DrawUi for EditArtistUi {
|
||||
}
|
||||
|
||||
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, _area: Rect) {
|
||||
if let Route::Lidarr(active_lidarr_block, _context_option) = app.get_current_route() {
|
||||
if let Route::Lidarr(active_lidarr_block, context_option) = app.get_current_route() {
|
||||
if let Some(context) = context_option
|
||||
&& ARTIST_DETAILS_BLOCKS.contains(&context)
|
||||
{
|
||||
draw_popup(f, app, ArtistDetailsUi::draw, Size::Large);
|
||||
}
|
||||
|
||||
let draw_edit_artist_prompt = |f: &mut Frame<'_>, app: &mut App<'_>, prompt_area: Rect| {
|
||||
draw_edit_artist_confirmation_prompt(f, app, prompt_area);
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ mod tests {
|
||||
|
||||
use crate::models::lidarr_models::{Artist, ArtistStatistics, ArtistStatus};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ADD_ARTIST_BLOCKS, ActiveLidarrBlock, DELETE_ARTIST_BLOCKS, EDIT_ARTIST_BLOCKS, LIBRARY_BLOCKS,
|
||||
ADD_ARTIST_BLOCKS, ARTIST_DETAILS_BLOCKS, ActiveLidarrBlock, DELETE_ARTIST_BLOCKS,
|
||||
EDIT_ARTIST_BLOCKS, LIBRARY_BLOCKS,
|
||||
};
|
||||
use crate::ui::DrawUi;
|
||||
use crate::ui::lidarr_ui::library::{LibraryUi, decorate_artist_row_with_style};
|
||||
@@ -19,6 +20,7 @@ mod tests {
|
||||
library_ui_blocks.extend(DELETE_ARTIST_BLOCKS);
|
||||
library_ui_blocks.extend(EDIT_ARTIST_BLOCKS);
|
||||
library_ui_blocks.extend(ADD_ARTIST_BLOCKS);
|
||||
library_ui_blocks.extend(ARTIST_DETAILS_BLOCKS);
|
||||
|
||||
for active_lidarr_block in ActiveLidarrBlock::iter() {
|
||||
if library_ui_blocks.contains(&active_lidarr_block) {
|
||||
@@ -182,7 +184,7 @@ mod tests {
|
||||
use crate::app::App;
|
||||
use crate::models::BlockSelectionState;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ActiveLidarrBlock, DELETE_ARTIST_SELECTION_BLOCKS,
|
||||
ActiveLidarrBlock, DELETE_ARTIST_SELECTION_BLOCKS, EDIT_ARTIST_SELECTION_BLOCKS,
|
||||
};
|
||||
use rstest::rstest;
|
||||
|
||||
@@ -263,5 +265,49 @@ mod tests {
|
||||
|
||||
insta::assert_snapshot!(output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_library_ui_renders_artist_details_over_library() {
|
||||
let mut app = App::test_default_fully_populated();
|
||||
app.push_navigation_stack(ActiveLidarrBlock::Artists.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistDetails.into());
|
||||
|
||||
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||
LibraryUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
insta::assert_snapshot!(output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_library_ui_renders_edit_artist_over_artist_details() {
|
||||
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.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);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_library_ui_renders_dropdown_over_edit_artist_over_artist_details() {
|
||||
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::EditArtistSelectMetadataProfile.into());
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use add_artist_ui::AddArtistUi;
|
||||
use artist_details_ui::ArtistDetailsUi;
|
||||
use delete_artist_ui::DeleteArtistUi;
|
||||
use edit_artist_ui::EditArtistUi;
|
||||
use ratatui::{
|
||||
@@ -28,6 +29,7 @@ use crate::{
|
||||
};
|
||||
|
||||
mod add_artist_ui;
|
||||
mod artist_details_ui;
|
||||
mod delete_artist_ui;
|
||||
mod edit_artist_ui;
|
||||
|
||||
@@ -43,6 +45,7 @@ impl DrawUi for LibraryUi {
|
||||
return AddArtistUi::accepts(route)
|
||||
|| DeleteArtistUi::accepts(route)
|
||||
|| EditArtistUi::accepts(route)
|
||||
|| ArtistDetailsUi::accepts(route)
|
||||
|| LIBRARY_BLOCKS.contains(&active_lidarr_block);
|
||||
}
|
||||
|
||||
@@ -57,6 +60,7 @@ impl DrawUi for LibraryUi {
|
||||
_ if AddArtistUi::accepts(route) => AddArtistUi::draw(f, app, area),
|
||||
_ if DeleteArtistUi::accepts(route) => DeleteArtistUi::draw(f, app, area),
|
||||
_ if EditArtistUi::accepts(route) => EditArtistUi::draw(f, app, area),
|
||||
_ if ArtistDetailsUi::accepts(route) => ArtistDetailsUi::draw(f, app, area),
|
||||
Route::Lidarr(ActiveLidarrBlock::UpdateAllArtistsPrompt, _) => {
|
||||
let confirmation_prompt = ConfirmationPrompt::new()
|
||||
.title("Update All Artists")
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/add_artist_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
╭───────────────────────────────────────────────────── Add Artist ─────────────────────────────────────────────────────╮
|
||||
│Test Artist │
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ ╭─────────────── Error ───────────────╮ │
|
||||
│ │ No artists found matching your query! │ │
|
||||
│ │ │ │
|
||||
│ ╰───────────────────────────────────────╯ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/add_artist_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
╭───────────────────────────────────────────────────── Add Artist ─────────────────────────────────────────────────────╮
|
||||
│Test Artist │
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
---
|
||||
source: src/ui/lidarr_ui/library/add_artist_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
╭───────────────────────────────────────────────────── Add Artist ─────────────────────────────────────────────────────╮
|
||||
│Test Artist │
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ✔ Name Type Status Rating Genres │
|
||||
│=> Test Artist Person Continuing 8.4 soundtrack │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ✔ Name Type Status Rating Genres │
|
||||
│=> Test Artist Person Continuing 8.4 soundtrack │
|
||||
│=> ✔ Test Artist Person Continuing 8.4 soundtrack │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰──────│ │───────╯
|
||||
╭──────│ │───────╮
|
||||
│ ✔ │ │ │
|
||||
│=> │ │ │
|
||||
│=> ✔ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ ╭─────────────────────────────────────────────────╮ │ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰──────│ │───────╯
|
||||
╭──────│ │───────╮
|
||||
│ ✔ │ │ │
|
||||
│=> │ │ │
|
||||
│=> ✔ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ ╭─────────────────────────────────────────────────╮ │ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰──────│ │───────╯
|
||||
╭──────│ │───────╮
|
||||
│ ✔ │ │ │
|
||||
│=> │ │ │
|
||||
│=> ✔ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ ╭─────────────────────────────────────────────────╮ │ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰──────│ │───────╯
|
||||
╭──────│ │───────╮
|
||||
│ ✔ │ │ │
|
||||
│=> │ │ │
|
||||
│=> ✔ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ ╭─────────────────────────────────────────────────╮ │ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰──────│ │───────╯
|
||||
╭──────│ │───────╮
|
||||
│ ✔ │ │ │
|
||||
│=> │ │ │
|
||||
│=> ✔ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ ╭─────────────────────────────────────────────────╮ │ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰──────│ │───────╯
|
||||
╭──────│ │───────╮
|
||||
│ ✔ │ │ │
|
||||
│=> │ │ │
|
||||
│=> ✔ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ ╭─────────────────────────────────────────────────╮ │ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰──────│ │───────╯
|
||||
╭──────│ │───────╮
|
||||
│ ✔ │ │ │
|
||||
│=> │ │ │
|
||||
│=> ✔ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ ╭─────────────────────────────────────────────────╮ │ │
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: output
|
||||
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ✔ Name Type Status Rating Genres │
|
||||
│=> Test Artist Person Continuing 8.4 soundtrack │
|
||||
│=> ✔ Test Artist Person Continuing 8.4 soundtrack │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
||||
+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 ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+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│ │
|
||||
│ │ for all monitored album(s) for the artist: Alex? │ │
|
||||
│ │ │ │
|
||||
│╭ Artist Details ───────────────────────│ │───────────────────────────────────────────╮│
|
||||
││ Albums │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭────────────────────────────╮╭───────────────────────────╮│ ││
|
||||
││ ││ 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 ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ╭──────────── Error ─────────────╮ ││
|
||||
││ │ No items found matching 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 ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ╭────────────── Search ───────────────╮ ││
|
||||
││ │album 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 ╭──────────────────── Update and Scan ────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │ Do you want to trigger an update and disk scan for the │ │
|
||||
│ │ artist: Alex? │ │
|
||||
│ │ │ │
|
||||
│╭ Artist Details ───────────────────────│ │───────────────────────────────────────────╮│
|
||||
││ Albums │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭────────────────────────────╮╭───────────────────────────╮│ ││
|
||||
││ ││ 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 ╭──────────────── Automatic Artist Search ────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │Do you want to trigger an automatic search of your indexers│ │
|
||||
│ │ for all monitored album(s) for the artist: Alex? │ │
|
||||
│ │ │ │
|
||||
│╭ Artist Details ───────────────────────│ │───────────────────────────────────────────╮│
|
||||
││ Albums │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭────────────────────────────╮╭───────────────────────────╮│ ││
|
||||
││ ││ 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 ╭──────────────────── Update and Scan ────────────────────╮ │
|
||||
│Size on Disk: 0.00 GB │ Do you want to trigger an update and disk scan for the │ │
|
||||
│ │ artist: Alex? │ │
|
||||
│ │ │ │
|
||||
│╭ Artist Details ───────────────────────│ │───────────────────────────────────────────╮│
|
||||
││ Albums │ │ ││
|
||||
││─────────────────────────────────────────│ │───────────────────────────────────────────││
|
||||
││ Monitored Title │ │ Release Date Size ││
|
||||
││=> 🏷 Test Album │ │ 2023-01-01 0.00 GB ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │ │ ││
|
||||
││ │╭────────────────────────────╮╭───────────────────────────╮│ ││
|
||||
││ ││ 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 ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+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 ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ ││
|
||||
││ ││
|
||||
││ Loading ... ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -20,7 +20,7 @@ expression: output
|
||||
|
||||
╭───────────────────── Delete Artist ─────────────────────╮
|
||||
│ Do you really want to delete the artist: │
|
||||
│ ? │
|
||||
│ Alex? │
|
||||
│ │
|
||||
│ │
|
||||
│ ╭───╮ │
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ expression: output
|
||||
|
||||
|
||||
|
||||
╭─────────────────────────────────────────────── Edit - ───────────────────────────────────────────────╮
|
||||
╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ expression: output
|
||||
|
||||
|
||||
|
||||
╭─────────────────────────────────────────────── Edit - ───────────────────────────────────────────────╮
|
||||
╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ expression: output
|
||||
|
||||
|
||||
|
||||
╭─────────────────────────────────────────────── Edit - ───────────────────────────────────────────────╮
|
||||
╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ expression: output
|
||||
|
||||
|
||||
|
||||
╭─────────────────────────────────────────────── Edit - ───────────────────────────────────────────────╮
|
||||
╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ expression: output
|
||||
|
||||
|
||||
|
||||
╭─────────────────────────────────────────────── Edit - ───────────────────────────────────────────────╮
|
||||
╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
||||
+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: 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 ││
|
||||
││─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────││
|
||||
││ Monitored Title Type Tracks Duration Release Date Size ││
|
||||
││=> 🏷 Test Album Album 10/10 0 min 2023-01-01 0.00 GB ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
││ ││
|
||||
│╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+2
-2
@@ -4,7 +4,7 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ expression: output
|
||||
|
||||
╭───────────────────── Delete Artist ─────────────────────╮
|
||||
│ Do you really want to delete the artist: │
|
||||
│ ? │
|
||||
│ Alex? │
|
||||
│ │
|
||||
│ │
|
||||
│ ╭───╮ │
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
---
|
||||
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
|
||||
|
||||
|
||||
|
||||
╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ ╭───╮ │
|
||||
│ Monitored: │ ✔ │ │
|
||||
│ ╰───╯ │
|
||||
│ ╭───────────────────────────────╮──────────────────────────────╮ │
|
||||
│ Monitor│Standard │ ▼ │ │
|
||||
│ │ │──────────────────────────────╯ │
|
||||
│ │ │──────────────────────────────╮ │
|
||||
│ Qual│ │ ▼ │ │
|
||||
│ │ │──────────────────────────────╯ │
|
||||
│ │ │──────────────────────────────╮ │
|
||||
│ Metad│ │ ▼ │ │
|
||||
│ │ │──────────────────────────────╯ │
|
||||
│ │ │──────────────────────────────╮ │
|
||||
│ │ │ │ │
|
||||
│ │ │──────────────────────────────╯ │
|
||||
│ │ │──────────────────────────────╮ │
|
||||
│ │ │ │ │
|
||||
│ ╰───────────────────────────────╯──────────────────────────────╯ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│
|
||||
││ Save ││ Cancel ││
|
||||
│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
---
|
||||
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
|
||||
|
||||
|
||||
|
||||
╭─────────────────────────────────── Edit - Alex (American pianist) ────────────────────────────────────╮
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ ╭───╮ │
|
||||
│ Monitored: │ ✔ │ │
|
||||
│ ╰───╯ │
|
||||
│ ╭─────────────────────────────────────────────────╮ │
|
||||
│ Monitor New Albums: │All Albums ▼ │ │
|
||||
│ ╰─────────────────────────────────────────────────╯ │
|
||||
│ ╭─────────────────────────────────────────────────╮ │
|
||||
│ Quality Profile: │Lossless ▼ │ │
|
||||
│ ╰─────────────────────────────────────────────────╯ │
|
||||
│ ╭─────────────────────────────────────────────────╮ │
|
||||
│ Metadata Profile: │Standard ▼ │ │
|
||||
│ ╰─────────────────────────────────────────────────╯ │
|
||||
│ ╭─────────────────────────────────────────────────╮ │
|
||||
│ Path: │/nfs/music │ │
|
||||
│ ╰─────────────────────────────────────────────────╯ │
|
||||
│ ╭─────────────────────────────────────────────────╮ │
|
||||
│ Tags: │alex │ │
|
||||
│ ╰─────────────────────────────────────────────────╯ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│
|
||||
││ Save ││ Cancel ││
|
||||
│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
+1
-1
@@ -4,7 +4,7 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ expression: output
|
||||
---
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Name ▼ Type Status Quality Profile Metadata Profile Albums Tracks Size Monitored Tags
|
||||
=> Continuing 0 0.00 GB
|
||||
=> Alex Person Continuing Lossless Standard 1 15/15 0.00 GB 🏷 alex
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user