feat: Implemented the Lidarr History tab and CLI support

This commit is contained in:
2026-01-12 14:21:58 -07:00
parent f31810e48a
commit 68b08d1cd7
41 changed files with 2505 additions and 78 deletions
+13
View File
@@ -9,6 +9,7 @@ use crate::models::servarr_models::{QualityProfile, Tag};
use crate::network::{Network, RequestMethod};
mod downloads;
mod history;
mod library;
mod root_folders;
mod system;
@@ -34,7 +35,9 @@ pub enum LidarrEvent {
GetArtistDetails(i64),
GetDiskSpace,
GetDownloads(u64),
GetHistory(u64),
GetHostConfig,
MarkHistoryItemAsFailed(i64),
GetMetadataProfiles,
GetQualityProfiles,
GetRootFolders,
@@ -67,6 +70,8 @@ impl NetworkResource for LidarrEvent {
| LidarrEvent::DeleteAlbum(_) => "/album",
LidarrEvent::GetDiskSpace => "/diskspace",
LidarrEvent::GetDownloads(_) => "/queue",
LidarrEvent::GetHistory(_) => "/history",
LidarrEvent::MarkHistoryItemAsFailed(_) => "/history/failed",
LidarrEvent::GetHostConfig | LidarrEvent::GetSecurityConfig => "/config/host",
LidarrEvent::TriggerAutomaticArtistSearch(_)
| LidarrEvent::UpdateAllArtists
@@ -120,6 +125,14 @@ impl Network<'_, '_> {
.get_lidarr_downloads(count)
.await
.map(LidarrSerdeable::from),
LidarrEvent::GetHistory(events) => self
.get_lidarr_history(events)
.await
.map(LidarrSerdeable::from),
LidarrEvent::MarkHistoryItemAsFailed(history_item_id) => self
.mark_lidarr_history_item_as_failed(history_item_id)
.await
.map(LidarrSerdeable::from),
LidarrEvent::GetHostConfig => self
.get_lidarr_host_config()
.await