feat(cli): Added sonarr support for listing downloads, listing quality profiles, and fetching detailed information about an episode

This commit is contained in:
2024-11-15 18:41:13 -07:00
parent e14b7072c6
commit 003f319385
10 changed files with 201 additions and 11 deletions
+8
View File
@@ -56,6 +56,12 @@ pub struct DownloadRecord {
pub download_client: String,
}
#[derive(Default, Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct DownloadsResponse {
pub records: Vec<DownloadRecord>,
}
#[derive(Default, Serialize, Deserialize, Hash, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Episode {
@@ -321,6 +327,7 @@ impl SeriesStatus {
#[allow(clippy::large_enum_variant)]
pub enum SonarrSerdeable {
Value(Value),
DownloadsResponse(DownloadsResponse),
Episode(Episode),
Episodes(Vec<Episode>),
QualityProfiles(Vec<QualityProfile>),
@@ -345,6 +352,7 @@ impl From<()> for SonarrSerdeable {
serde_enum_from!(
SonarrSerdeable {
Value(Value),
DownloadsResponse(DownloadsResponse),
Episode(Episode),
Episodes(Vec<Episode>),
QualityProfiles(Vec<QualityProfile>),