style: Applied uniform formatting across all new Lidarr files
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::app::App;
|
||||
use crate::app::context_clues::ContextClueProvider;
|
||||
use crate::app::key_binding::DEFAULT_KEYBINDINGS;
|
||||
use crate::app::lidarr::lidarr_context_clues::{LidarrContextClueProvider, ARTISTS_CONTEXT_CLUES};
|
||||
use crate::app::App;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ActiveLidarrBlock,
|
||||
use crate::app::lidarr::lidarr_context_clues::{
|
||||
ARTISTS_CONTEXT_CLUES, LidarrContextClueProvider,
|
||||
};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::servarr_data::radarr::radarr_data::ActiveRadarrBlock;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use pretty_assertions::assert_eq;
|
||||
use crate::app::App;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::network::NetworkEvent;
|
||||
use crate::network::lidarr_network::LidarrEvent;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
#[tokio::test]
|
||||
@@ -13,7 +13,9 @@ mod tests {
|
||||
let mut app = App::test_default();
|
||||
app.network_tx = Some(tx);
|
||||
|
||||
app.dispatch_by_lidarr_block(&ActiveLidarrBlock::Artists).await;
|
||||
app
|
||||
.dispatch_by_lidarr_block(&ActiveLidarrBlock::Artists)
|
||||
.await;
|
||||
|
||||
assert!(app.is_loading);
|
||||
assert_eq!(
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ mod app_tests;
|
||||
pub mod context_clues;
|
||||
pub mod key_binding;
|
||||
mod key_binding_tests;
|
||||
pub mod lidarr;
|
||||
pub mod radarr;
|
||||
pub mod sonarr;
|
||||
pub mod lidarr;
|
||||
|
||||
pub struct App<'a> {
|
||||
navigation_stack: Vec<Route>,
|
||||
@@ -361,7 +361,7 @@ impl AppConfig {
|
||||
if let Some(sonarr_configs) = &self.sonarr {
|
||||
sonarr_configs.iter().for_each(|config| config.validate());
|
||||
}
|
||||
|
||||
|
||||
if let Some(lidarr_configs) = &self.lidarr {
|
||||
lidarr_configs.iter().for_each(|config| config.validate());
|
||||
}
|
||||
|
||||
@@ -2,16 +2,18 @@
|
||||
mod tests {
|
||||
use std::sync::Arc;
|
||||
|
||||
use clap::{error::ErrorKind, CommandFactory};
|
||||
use clap::{CommandFactory, error::ErrorKind};
|
||||
use mockall::predicate::eq;
|
||||
use rstest::rstest;
|
||||
use serde_json::json;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::{
|
||||
Cli,
|
||||
app::App,
|
||||
cli::{handle_command, mutex_flags_or_option, radarr::RadarrCommand, sonarr::SonarrCommand},
|
||||
models::{
|
||||
Serdeable,
|
||||
radarr_models::{
|
||||
BlocklistItem as RadarrBlocklistItem, BlocklistResponse as RadarrBlocklistResponse,
|
||||
RadarrSerdeable,
|
||||
@@ -20,12 +22,10 @@ mod tests {
|
||||
BlocklistItem as SonarrBlocklistItem, BlocklistResponse as SonarrBlocklistResponse,
|
||||
SonarrSerdeable,
|
||||
},
|
||||
Serdeable,
|
||||
},
|
||||
network::{
|
||||
radarr_network::RadarrEvent, sonarr_network::SonarrEvent, MockNetworkTrait, NetworkEvent,
|
||||
MockNetworkTrait, NetworkEvent, radarr_network::RadarrEvent, sonarr_network::SonarrEvent,
|
||||
},
|
||||
Cli,
|
||||
};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_delete_artist_requires_arguments() {
|
||||
let result =
|
||||
Cli::command().try_get_matches_from(["managarr", "lidarr", "delete", "artist"]);
|
||||
let result = Cli::command().try_get_matches_from(["managarr", "lidarr", "delete", "artist"]);
|
||||
|
||||
assert_err!(&result);
|
||||
assert_eq!(
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::cli::{
|
||||
lidarr::{list_command_handler::LidarrListCommand, LidarrCommand},
|
||||
Command,
|
||||
};
|
||||
use crate::Cli;
|
||||
use crate::cli::{
|
||||
Command,
|
||||
lidarr::{LidarrCommand, list_command_handler::LidarrListCommand},
|
||||
};
|
||||
use clap::CommandFactory;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -54,8 +54,7 @@ mod tests {
|
||||
cli::{
|
||||
CliCommandHandler,
|
||||
lidarr::{
|
||||
LidarrCliHandler, LidarrCommand,
|
||||
delete_command_handler::LidarrDeleteCommand,
|
||||
LidarrCliHandler, LidarrCommand, delete_command_handler::LidarrDeleteCommand,
|
||||
list_command_handler::LidarrListCommand,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -9,23 +9,23 @@ mod tests {
|
||||
use rstest::rstest;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::app::App;
|
||||
use crate::app::context_clues::SERVARR_CONTEXT_CLUES;
|
||||
use crate::app::key_binding::{KeyBinding, DEFAULT_KEYBINDINGS};
|
||||
use crate::app::key_binding::{DEFAULT_KEYBINDINGS, KeyBinding};
|
||||
use crate::app::radarr::radarr_context_clues::{
|
||||
LIBRARY_CONTEXT_CLUES, MOVIE_DETAILS_CONTEXT_CLUES,
|
||||
};
|
||||
use crate::app::App;
|
||||
use crate::event::Key;
|
||||
use crate::handlers::{handle_clear_errors, handle_prompt_toggle};
|
||||
use crate::handlers::{handle_events, populate_keymapping_table};
|
||||
use crate::models::HorizontallyScrollableText;
|
||||
use crate::models::Route;
|
||||
use crate::models::servarr_data::ActiveKeybindingBlock;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, RadarrData};
|
||||
use crate::models::servarr_data::sonarr::sonarr_data::ActiveSonarrBlock;
|
||||
use crate::models::servarr_data::ActiveKeybindingBlock;
|
||||
use crate::models::servarr_models::KeybindingItem;
|
||||
use crate::models::stateful_table::StatefulTable;
|
||||
use crate::models::HorizontallyScrollableText;
|
||||
use crate::models::Route;
|
||||
|
||||
#[test]
|
||||
fn test_handle_clear_errors() {
|
||||
@@ -128,8 +128,8 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_handle_empties_keybindings_table_on_help_button_press_when_keybindings_table_is_already_populated(
|
||||
) {
|
||||
fn test_handle_empties_keybindings_table_on_help_button_press_when_keybindings_table_is_already_populated()
|
||||
{
|
||||
let mut app = App::test_default();
|
||||
let keybinding_items = Vec::from(SERVARR_CONTEXT_CLUES)
|
||||
.iter()
|
||||
@@ -260,8 +260,8 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_populate_keymapping_table_populates_delegated_servarr_context_provider_options_before_global_options(
|
||||
) {
|
||||
fn test_populate_keymapping_table_populates_delegated_servarr_context_provider_options_before_global_options()
|
||||
{
|
||||
let mut expected_keybinding_items = MOVIE_DETAILS_CONTEXT_CLUES
|
||||
.iter()
|
||||
.map(|(key, desc)| context_clue_to_keybinding_item(key, desc))
|
||||
|
||||
@@ -6,8 +6,8 @@ mod tests {
|
||||
use serde_json::Number;
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::handlers::lidarr_handlers::library::{LibraryHandler, artists_sorting_options};
|
||||
use crate::handlers::KeyEventHandler;
|
||||
use crate::handlers::lidarr_handlers::library::{LibraryHandler, artists_sorting_options};
|
||||
use crate::models::lidarr_models::{Artist, ArtistStatistics, ArtistStatus};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{ActiveLidarrBlock, LIBRARY_BLOCKS};
|
||||
|
||||
|
||||
@@ -33,16 +33,15 @@ pub(super) struct LibraryHandler<'a, 'b> {
|
||||
|
||||
impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for LibraryHandler<'a, 'b> {
|
||||
fn handle(&mut self) {
|
||||
let artists_table_handling_config =
|
||||
TableHandlingConfig::new(ActiveLidarrBlock::Artists.into())
|
||||
.sorting_block(ActiveLidarrBlock::ArtistsSortPrompt.into())
|
||||
.sort_options(artists_sorting_options())
|
||||
.searching_block(ActiveLidarrBlock::SearchArtists.into())
|
||||
.search_error_block(ActiveLidarrBlock::SearchArtistsError.into())
|
||||
.search_field_fn(|artist| &artist.artist_name.text)
|
||||
.filtering_block(ActiveLidarrBlock::FilterArtists.into())
|
||||
.filter_error_block(ActiveLidarrBlock::FilterArtistsError.into())
|
||||
.filter_field_fn(|artist| &artist.artist_name.text);
|
||||
let artists_table_handling_config = TableHandlingConfig::new(ActiveLidarrBlock::Artists.into())
|
||||
.sorting_block(ActiveLidarrBlock::ArtistsSortPrompt.into())
|
||||
.sort_options(artists_sorting_options())
|
||||
.searching_block(ActiveLidarrBlock::SearchArtists.into())
|
||||
.search_error_block(ActiveLidarrBlock::SearchArtistsError.into())
|
||||
.search_field_fn(|artist| &artist.artist_name.text)
|
||||
.filtering_block(ActiveLidarrBlock::FilterArtists.into())
|
||||
.filter_error_block(ActiveLidarrBlock::FilterArtistsError.into())
|
||||
.filter_field_fn(|artist| &artist.artist_name.text);
|
||||
|
||||
if !handle_table(
|
||||
self,
|
||||
|
||||
@@ -37,16 +37,7 @@ pub struct Artist {
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Serialize,
|
||||
Deserialize,
|
||||
Default,
|
||||
PartialEq,
|
||||
Eq,
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Display,
|
||||
EnumDisplayStyle,
|
||||
Serialize, Deserialize, Default, PartialEq, Eq, Clone, Copy, Debug, Display, EnumDisplayStyle,
|
||||
)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[strum(serialize_all = "camelCase")]
|
||||
|
||||
@@ -4,8 +4,8 @@ mod tests {
|
||||
use serde_json::json;
|
||||
|
||||
use crate::models::{
|
||||
lidarr_models::{Artist, ArtistStatistics, ArtistStatus, LidarrSerdeable, Ratings},
|
||||
Serdeable,
|
||||
lidarr_models::{Artist, ArtistStatistics, ArtistStatus, LidarrSerdeable, Ratings},
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
||||
+2
-2
@@ -1,14 +1,14 @@
|
||||
use std::fmt::{Debug, Display, Formatter};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
use crate::app::context_clues::ContextClue;
|
||||
use crate::app::ServarrConfig;
|
||||
use crate::app::context_clues::ContextClue;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::servarr_data::radarr::radarr_data::ActiveRadarrBlock;
|
||||
use lidarr_models::LidarrSerdeable;
|
||||
use radarr_models::RadarrSerdeable;
|
||||
use regex::Regex;
|
||||
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer, de};
|
||||
use serde_json::Number;
|
||||
use servarr_data::sonarr::sonarr_data::ActiveSonarrBlock;
|
||||
use sonarr_models::SonarrSerdeable;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
use bimap::BiMap;
|
||||
use chrono::{DateTime, Utc};
|
||||
use strum::EnumIter;
|
||||
#[cfg(test)]
|
||||
use strum::{Display, EnumString};
|
||||
use crate::app::lidarr::lidarr_context_clues::ARTISTS_CONTEXT_CLUES;
|
||||
use crate::models::{
|
||||
Route, TabRoute, TabState,
|
||||
@@ -11,6 +6,11 @@ use crate::models::{
|
||||
stateful_table::StatefulTable,
|
||||
};
|
||||
use crate::network::lidarr_network::LidarrEvent;
|
||||
use bimap::BiMap;
|
||||
use chrono::{DateTime, Utc};
|
||||
use strum::EnumIter;
|
||||
#[cfg(test)]
|
||||
use strum::{Display, EnumString};
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "lidarr_data_tests.rs"]
|
||||
@@ -58,14 +58,12 @@ impl<'a> Default for LidarrData<'a> {
|
||||
start_time: Utc::now(),
|
||||
tags_map: BiMap::new(),
|
||||
version: String::new(),
|
||||
main_tabs: TabState::new(vec![
|
||||
TabRoute {
|
||||
title: "Library".to_string(),
|
||||
route: ActiveLidarrBlock::Artists.into(),
|
||||
contextual_help: Some(&ARTISTS_CONTEXT_CLUES),
|
||||
config: None,
|
||||
},
|
||||
]),
|
||||
main_tabs: TabState::new(vec![TabRoute {
|
||||
title: "Library".to_string(),
|
||||
route: ActiveLidarrBlock::Artists.into(),
|
||||
contextual_help: Some(&ARTISTS_CONTEXT_CLUES),
|
||||
config: None,
|
||||
}]),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +74,7 @@ impl LidarrData<'_> {
|
||||
use crate::models::lidarr_models::{Artist, DownloadRecord};
|
||||
use crate::models::servarr_models::{DiskSpace, RootFolder};
|
||||
use crate::models::stateful_table::SortOption;
|
||||
|
||||
|
||||
let mut lidarr_data = LidarrData::default();
|
||||
lidarr_data.artists.set_items(vec![Artist::default()]);
|
||||
lidarr_data.artists.sorting(vec![SortOption {
|
||||
@@ -92,10 +90,14 @@ impl LidarrData<'_> {
|
||||
free_space: 50000000000,
|
||||
total_space: 100000000000,
|
||||
}];
|
||||
lidarr_data.downloads.set_items(vec![DownloadRecord::default()]);
|
||||
lidarr_data.root_folders.set_items(vec![RootFolder::default()]);
|
||||
lidarr_data
|
||||
.downloads
|
||||
.set_items(vec![DownloadRecord::default()]);
|
||||
lidarr_data
|
||||
.root_folders
|
||||
.set_items(vec![RootFolder::default()]);
|
||||
lidarr_data.version = "1.0.0".to_owned();
|
||||
|
||||
|
||||
lidarr_data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ mod tests {
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
use crate::models::{
|
||||
servarr_data::lidarr::lidarr_data::{ActiveLidarrBlock, LidarrData},
|
||||
Route,
|
||||
servarr_data::lidarr::lidarr_data::{ActiveLidarrBlock, LidarrData},
|
||||
};
|
||||
|
||||
#[test]
|
||||
@@ -25,7 +25,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_reset_delete_artist_preferences() {
|
||||
let mut lidarr_data = LidarrData{
|
||||
let mut lidarr_data = LidarrData {
|
||||
delete_artist_files: true,
|
||||
add_import_list_exclusion: true,
|
||||
..LidarrData::default()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use crate::models::Route;
|
||||
|
||||
pub mod lidarr;
|
||||
pub mod modals;
|
||||
pub mod radarr;
|
||||
pub mod sonarr;
|
||||
pub mod lidarr;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(in crate::models::servarr_data) mod data_test_utils;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use anyhow::Result;
|
||||
use log::info;
|
||||
|
||||
use crate::models::Route;
|
||||
use crate::models::lidarr_models::{Artist, DeleteArtistParams};
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::Route;
|
||||
use crate::network::lidarr_network::LidarrEvent;
|
||||
use crate::network::{Network, RequestMethod};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ mod tests {
|
||||
use crate::models::lidarr_models::{LidarrSerdeable, MetadataProfile};
|
||||
use crate::models::servarr_models::{QualityProfile, Tag};
|
||||
use crate::network::network_tests::test_utils::{MockServarrApi, test_network};
|
||||
use crate::network::{lidarr_network::LidarrEvent, NetworkEvent, NetworkResource};
|
||||
use crate::network::{NetworkEvent, NetworkResource, lidarr_network::LidarrEvent};
|
||||
use pretty_assertions::{assert_eq, assert_str_eq};
|
||||
use rstest::rstest;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -60,10 +60,7 @@ impl Network<'_, '_> {
|
||||
LidarrEvent::DeleteArtist(params) => {
|
||||
self.delete_artist(params).await.map(LidarrSerdeable::from)
|
||||
}
|
||||
LidarrEvent::GetDiskSpace => self
|
||||
.get_lidarr_diskspace()
|
||||
.await
|
||||
.map(LidarrSerdeable::from),
|
||||
LidarrEvent::GetDiskSpace => self.get_lidarr_diskspace().await.map(LidarrSerdeable::from),
|
||||
LidarrEvent::GetDownloads(count) => self
|
||||
.get_lidarr_downloads(count)
|
||||
.await
|
||||
@@ -80,10 +77,7 @@ impl Network<'_, '_> {
|
||||
.get_lidarr_root_folders()
|
||||
.await
|
||||
.map(LidarrSerdeable::from),
|
||||
LidarrEvent::GetStatus => self
|
||||
.get_lidarr_status()
|
||||
.await
|
||||
.map(LidarrSerdeable::from),
|
||||
LidarrEvent::GetStatus => self.get_lidarr_status().await.map(LidarrSerdeable::from),
|
||||
LidarrEvent::GetTags => self.get_lidarr_tags().await.map(LidarrSerdeable::from),
|
||||
LidarrEvent::HealthCheck => self
|
||||
.get_lidarr_healthcheck()
|
||||
|
||||
+1
-1
@@ -3,12 +3,12 @@ use std::sync::Arc;
|
||||
|
||||
use anyhow::{Result, anyhow};
|
||||
use async_trait::async_trait;
|
||||
use lidarr_network::LidarrEvent;
|
||||
use log::{debug, error, warn};
|
||||
use regex::Regex;
|
||||
use reqwest::{Client, RequestBuilder};
|
||||
use serde::Serialize;
|
||||
use serde::de::DeserializeOwned;
|
||||
use lidarr_network::LidarrEvent;
|
||||
use sonarr_network::SonarrEvent;
|
||||
use strum_macros::Display;
|
||||
use tokio::select;
|
||||
|
||||
@@ -31,7 +31,13 @@ impl DrawUi for DeleteArtistUi {
|
||||
let selected_block = app.data.lidarr_data.selected_block.get_active_block();
|
||||
let prompt = format!(
|
||||
"Do you really want to delete the artist: \n{}?",
|
||||
app.data.lidarr_data.artists.current_selection().artist_name.text
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
.artists
|
||||
.current_selection()
|
||||
.artist_name
|
||||
.text
|
||||
);
|
||||
let checkboxes = vec![
|
||||
Checkbox::new("Delete Artist Files")
|
||||
|
||||
@@ -6,9 +6,9 @@ mod tests {
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::{
|
||||
ActiveLidarrBlock, DELETE_ARTIST_BLOCKS, LIBRARY_BLOCKS,
|
||||
};
|
||||
use crate::ui::DrawUi;
|
||||
use crate::ui::lidarr_ui::library::{LibraryUi, decorate_artist_row_with_style};
|
||||
use crate::ui::styles::ManagarrStyle;
|
||||
use crate::ui::DrawUi;
|
||||
use pretty_assertions::assert_eq;
|
||||
use ratatui::widgets::{Cell, Row};
|
||||
|
||||
@@ -183,9 +183,9 @@ mod tests {
|
||||
};
|
||||
use rstest::rstest;
|
||||
|
||||
use crate::ui::DrawUi;
|
||||
use crate::ui::lidarr_ui::library::LibraryUi;
|
||||
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
|
||||
use crate::ui::DrawUi;
|
||||
|
||||
#[rstest]
|
||||
fn test_library_ui_renders(
|
||||
|
||||
@@ -84,12 +84,9 @@ fn draw_library(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
.statistics
|
||||
.as_ref()
|
||||
.map_or(0, |stats| stats.album_count);
|
||||
let tracks = artist
|
||||
.statistics
|
||||
.as_ref()
|
||||
.map_or(String::new(), |stats| {
|
||||
format!("{}/{}", stats.track_file_count, stats.total_track_count)
|
||||
});
|
||||
let tracks = artist.statistics.as_ref().map_or(String::new(), |stats| {
|
||||
format!("{}/{}", stats.track_file_count, stats.total_track_count)
|
||||
});
|
||||
let tags = artist
|
||||
.tags
|
||||
.iter()
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
mod tests {
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::models::Route;
|
||||
use crate::models::servarr_data::lidarr::lidarr_data::ActiveLidarrBlock;
|
||||
use crate::ui::DrawUi;
|
||||
use crate::ui::lidarr_ui::LidarrUi;
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ use crate::{
|
||||
use super::{
|
||||
DrawUi, draw_tabs,
|
||||
styles::ManagarrStyle,
|
||||
utils::{borderless_block, layout_block, line_gauge_with_label, line_gauge_with_title, title_block},
|
||||
utils::{
|
||||
borderless_block, layout_block, line_gauge_with_label, line_gauge_with_title, title_block,
|
||||
},
|
||||
widgets::loading_block::LoadingBlock,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,7 @@
|
||||
use std::cell::Cell;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
use lidarr_ui::LidarrUi;
|
||||
use ratatui::Frame;
|
||||
use ratatui::layout::{Constraint, Flex, Layout, Rect};
|
||||
use ratatui::style::{Style, Stylize};
|
||||
@@ -9,7 +10,6 @@ use ratatui::widgets::Paragraph;
|
||||
use ratatui::widgets::Tabs;
|
||||
use ratatui::widgets::Wrap;
|
||||
use ratatui::widgets::{Clear, Row};
|
||||
use lidarr_ui::LidarrUi;
|
||||
use sonarr_ui::SonarrUi;
|
||||
use utils::layout_block;
|
||||
|
||||
|
||||
+3
-3
@@ -6,10 +6,10 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::Result;
|
||||
use anyhow::{anyhow, Context};
|
||||
use anyhow::{Context, anyhow};
|
||||
use colored::Colorize;
|
||||
use indicatif::{ProgressBar, ProgressStyle};
|
||||
use log::{error, LevelFilter};
|
||||
use log::{LevelFilter, error};
|
||||
use log4rs::append::file::FileAppender;
|
||||
use log4rs::config::{Appender, Root};
|
||||
use log4rs::encode::pattern::PatternEncoder;
|
||||
@@ -18,7 +18,7 @@ use reqwest::{Certificate, Client};
|
||||
use tokio::sync::Mutex;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::app::{log_and_print_error, App, AppConfig};
|
||||
use crate::app::{App, AppConfig, log_and_print_error};
|
||||
use crate::cli::{self, Command};
|
||||
use crate::network::Network;
|
||||
use crate::ui::theme::ThemeDefinitionsWrapper;
|
||||
|
||||
Reference in New Issue
Block a user