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

This commit is contained in:
Dark-Alex-17 committed 2024-11-15 18:41:13 -07:00
1 parent e14b7072c6
commit 003f319385
10 files changed
+201 -11

No files matched your search

+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>),