feat: Full CLI and TUI support for adding an artist to Lidarr

This commit is contained in:
2026-01-08 15:16:01 -07:00
parent e94f78dc7b
commit c624d1b9e4
28 changed files with 3448 additions and 86 deletions
+25 -1
View File
@@ -6,7 +6,7 @@ mod tests {
use crate::models::lidarr_models::{
AddArtistSearchResult, DownloadRecord, DownloadStatus, DownloadsResponse, Member,
MetadataProfile, NewItemMonitorType, SystemStatus,
MetadataProfile, MonitorType, NewItemMonitorType, SystemStatus,
};
use crate::models::servarr_models::{
DiskSpace, HostConfig, QualityProfile, RootFolder, SecurityConfig, Tag,
@@ -35,6 +35,30 @@ mod tests {
assert_str_eq!(NewItemMonitorType::New.to_display_str(), "New Albums");
}
#[test]
fn test_monitor_type_display() {
assert_str_eq!(MonitorType::All.to_string(), "all");
assert_str_eq!(MonitorType::Future.to_string(), "future");
assert_str_eq!(MonitorType::Missing.to_string(), "missing");
assert_str_eq!(MonitorType::Existing.to_string(), "existing");
assert_str_eq!(MonitorType::First.to_string(), "first");
assert_str_eq!(MonitorType::Latest.to_string(), "latest");
assert_str_eq!(MonitorType::None.to_string(), "none");
assert_str_eq!(MonitorType::Unknown.to_string(), "unknown");
}
#[test]
fn test_monitor_type_to_display_str() {
assert_str_eq!(MonitorType::All.to_display_str(), "All Albums");
assert_str_eq!(MonitorType::Future.to_display_str(), "Future Albums");
assert_str_eq!(MonitorType::Missing.to_display_str(), "Missing Albums");
assert_str_eq!(MonitorType::Existing.to_display_str(), "Existing Albums");
assert_str_eq!(MonitorType::First.to_display_str(), "First Album");
assert_str_eq!(MonitorType::Latest.to_display_str(), "Latest Album");
assert_str_eq!(MonitorType::None.to_display_str(), "None");
assert_str_eq!(MonitorType::Unknown.to_display_str(), "Unknown");
}
#[test]
fn test_lidarr_serdeable_from() {
let lidarr_serdeable = LidarrSerdeable::Value(json!({}));