Mostly added Add movie functionality. Removed calendar functions for now. Want to add the ability to modify settings and quality profiles first

This commit is contained in:
2023-08-08 10:50:04 -06:00
parent ae6e19a414
commit 08cde20359
14 changed files with 475 additions and 98 deletions
+37 -1
View File
@@ -1,6 +1,6 @@
use chrono::{DateTime, Utc};
use derivative::Derivative;
use serde::Deserialize;
use serde::{Deserialize, Serialize};
use serde_json::Number;
use crate::models::HorizontallyScrollableText;
@@ -199,3 +199,39 @@ pub struct Credit {
#[serde(rename(deserialize = "type"))]
pub credit_type: CreditType,
}
#[derive(Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct AddMovieBody {
pub tmdb_id: Number,
pub title: String,
pub root_folder_path: String,
pub quality_profile_id: Number,
pub minimum_availability: String,
pub monitored: bool,
pub add_options: AddOptions,
}
#[derive(Serialize, Debug, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AddOptions {
pub search_for_movie: bool,
}
#[derive(Derivative, Deserialize, Debug, Clone, PartialEq, Eq)]
#[derivative(Default)]
#[serde(rename_all = "camelCase")]
pub struct AddMovieSearchResult {
#[derivative(Default(value = "Number::from(0)"))]
pub tmdb_id: Number,
pub title: String,
pub original_language: Language,
pub status: String,
pub overview: String,
pub genres: Vec<String>,
#[derivative(Default(value = "Number::from(0)"))]
pub year: Number,
#[derivative(Default(value = "Number::from(0)"))]
pub runtime: Number,
pub ratings: RatingsList,
}