fix(readarr): send an empty images list when adding an author
This commit is contained in:
7 files changed
+11
No files matched your search
@@ -171,6 +171,7 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrAddCommand> for ReadarrAddCommandH
|
|||||||
quality_profile_id,
|
quality_profile_id,
|
||||||
metadata_profile_id,
|
metadata_profile_id,
|
||||||
tags,
|
tags,
|
||||||
|
images: Vec::new(),
|
||||||
tag_input_string: None,
|
tag_input_string: None,
|
||||||
add_options: AddAuthorOptions {
|
add_options: AddAuthorOptions {
|
||||||
monitor,
|
monitor,
|
||||||
|
|||||||
@@ -447,6 +447,7 @@ mod tests {
|
|||||||
quality_profile_id: 1,
|
quality_profile_id: 1,
|
||||||
metadata_profile_id: 1,
|
metadata_profile_id: 1,
|
||||||
tags: vec![1, 2],
|
tags: vec![1, 2],
|
||||||
|
images: Vec::new(),
|
||||||
tag_input_string: None,
|
tag_input_string: None,
|
||||||
add_options: AddAuthorOptions {
|
add_options: AddAuthorOptions {
|
||||||
monitor: MonitorType::All,
|
monitor: MonitorType::All,
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ impl AddAuthorHandler<'_, '_> {
|
|||||||
quality_profile_id,
|
quality_profile_id,
|
||||||
metadata_profile_id,
|
metadata_profile_id,
|
||||||
tags: Vec::new(),
|
tags: Vec::new(),
|
||||||
|
images: Vec::new(),
|
||||||
tag_input_string: Some(tags),
|
tag_input_string: Some(tags),
|
||||||
add_options: AddAuthorOptions {
|
add_options: AddAuthorOptions {
|
||||||
monitor,
|
monitor,
|
||||||
|
|||||||
@@ -1237,6 +1237,7 @@ mod tests {
|
|||||||
quality_profile_id: 2222,
|
quality_profile_id: 2222,
|
||||||
metadata_profile_id: 4444,
|
metadata_profile_id: 4444,
|
||||||
tags: Vec::default(),
|
tags: Vec::default(),
|
||||||
|
images: Vec::new(),
|
||||||
tag_input_string: Some("usenet, testing".to_owned()),
|
tag_input_string: Some("usenet, testing".to_owned()),
|
||||||
add_options: AddAuthorOptions {
|
add_options: AddAuthorOptions {
|
||||||
monitor: MonitorType::Future,
|
monitor: MonitorType::Future,
|
||||||
@@ -1628,6 +1629,7 @@ mod tests {
|
|||||||
quality_profile_id: 2222,
|
quality_profile_id: 2222,
|
||||||
metadata_profile_id: 4444,
|
metadata_profile_id: 4444,
|
||||||
tags: Vec::default(),
|
tags: Vec::default(),
|
||||||
|
images: Vec::new(),
|
||||||
tag_input_string: Some("usenet, testing".to_owned()),
|
tag_input_string: Some("usenet, testing".to_owned()),
|
||||||
add_options: AddAuthorOptions {
|
add_options: AddAuthorOptions {
|
||||||
monitor: MonitorType::Future,
|
monitor: MonitorType::Future,
|
||||||
@@ -1795,6 +1797,7 @@ mod tests {
|
|||||||
quality_profile_id: 2222,
|
quality_profile_id: 2222,
|
||||||
metadata_profile_id: 4444,
|
metadata_profile_id: 4444,
|
||||||
tags: Vec::default(),
|
tags: Vec::default(),
|
||||||
|
images: Vec::new(),
|
||||||
tag_input_string: Some("usenet, testing".to_owned()),
|
tag_input_string: Some("usenet, testing".to_owned()),
|
||||||
add_options: AddAuthorOptions {
|
add_options: AddAuthorOptions {
|
||||||
monitor: MonitorType::Future,
|
monitor: MonitorType::Future,
|
||||||
|
|||||||
@@ -222,6 +222,8 @@ pub struct AddAuthorBody {
|
|||||||
pub quality_profile_id: i64,
|
pub quality_profile_id: i64,
|
||||||
pub metadata_profile_id: i64,
|
pub metadata_profile_id: i64,
|
||||||
pub tags: Vec<i64>,
|
pub tags: Vec<i64>,
|
||||||
|
// Readarr-Resurrected persists the add body directly and rejects it when the images list is absent
|
||||||
|
pub images: Vec<Value>,
|
||||||
#[serde(skip_serializing, skip_deserializing)]
|
#[serde(skip_serializing, skip_deserializing)]
|
||||||
pub tag_input_string: Option<String>,
|
pub tag_input_string: Option<String>,
|
||||||
pub add_options: AddAuthorOptions,
|
pub add_options: AddAuthorOptions,
|
||||||
|
|||||||
@@ -680,6 +680,7 @@ mod tests {
|
|||||||
"qualityProfileId": 1,
|
"qualityProfileId": 1,
|
||||||
"metadataProfileId": 1,
|
"metadataProfileId": 1,
|
||||||
"tags": [1, 2],
|
"tags": [1, 2],
|
||||||
|
"images": [],
|
||||||
"addOptions": {
|
"addOptions": {
|
||||||
"monitor": "all",
|
"monitor": "all",
|
||||||
"monitorNewItems": "all",
|
"monitorNewItems": "all",
|
||||||
@@ -722,6 +723,7 @@ mod tests {
|
|||||||
"qualityProfileId": 1,
|
"qualityProfileId": 1,
|
||||||
"metadataProfileId": 1,
|
"metadataProfileId": 1,
|
||||||
"tags": [1, 2],
|
"tags": [1, 2],
|
||||||
|
"images": [],
|
||||||
"addOptions": {
|
"addOptions": {
|
||||||
"monitor": "all",
|
"monitor": "all",
|
||||||
"monitorNewItems": "all",
|
"monitorNewItems": "all",
|
||||||
|
|||||||
@@ -394,6 +394,7 @@ pub mod test_utils {
|
|||||||
quality_profile_id: 1,
|
quality_profile_id: 1,
|
||||||
metadata_profile_id: 1,
|
metadata_profile_id: 1,
|
||||||
tags: Vec::default(),
|
tags: Vec::default(),
|
||||||
|
images: Vec::new(),
|
||||||
tag_input_string: Some("usenet, testing".to_owned()),
|
tag_input_string: Some("usenet, testing".to_owned()),
|
||||||
add_options: AddAuthorOptions {
|
add_options: AddAuthorOptions {
|
||||||
monitor: MonitorType::All,
|
monitor: MonitorType::All,
|
||||||
|
|||||||
Reference in new issue
Block a user