Fully functional manual searching capabilities and refresh capabilities for all movies, downloads, and collections
This commit is contained in:
@@ -289,6 +289,10 @@ impl HorizontallyScrollableText {
|
||||
self.reset_offset();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn stationary_style(&self) -> String {
|
||||
self.text.clone().trim().to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::fmt::{Display, Formatter};
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use derivative::Derivative;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use serde_json::Number;
|
||||
|
||||
use crate::models::HorizontallyScrollableText;
|
||||
@@ -76,6 +76,7 @@ pub struct CollectionMovie {
|
||||
#[derivative(Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Collection {
|
||||
#[serde(default)]
|
||||
pub title: String,
|
||||
pub root_folder_path: Option<String>,
|
||||
pub search_on_add: bool,
|
||||
@@ -217,13 +218,17 @@ pub struct Credit {
|
||||
|
||||
#[derive(Deserialize, Derivative, Clone, Debug, PartialEq, Eq)]
|
||||
#[derivative(Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Release {
|
||||
pub guid: String,
|
||||
pub protocol: String,
|
||||
#[derivative(Default(value = "Number::from(0)"))]
|
||||
pub age: Number,
|
||||
pub title: HorizontallyScrollableText,
|
||||
pub indexer: String,
|
||||
#[derivative(Default(value = "Number::from(0)"))]
|
||||
pub indexer_id: Number,
|
||||
#[derivative(Default(value = "Number::from(0)"))]
|
||||
pub size: Number,
|
||||
pub rejected: bool,
|
||||
pub rejections: Option<Vec<String>>,
|
||||
@@ -235,7 +240,7 @@ pub struct Release {
|
||||
pub quality: QualityWrapper,
|
||||
}
|
||||
|
||||
#[derive(Default, Derivative, Serialize, Debug)]
|
||||
#[derive(Default, Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct AddMovieBody {
|
||||
pub tmdb_id: u64,
|
||||
@@ -254,6 +259,13 @@ pub struct AddOptions {
|
||||
pub search_for_movie: bool,
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ReleaseDownloadBody {
|
||||
pub guid: String,
|
||||
pub indexer_id: u64,
|
||||
}
|
||||
|
||||
#[derive(Derivative, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[derivative(Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
@@ -274,11 +286,17 @@ pub struct AddMovieSearchResult {
|
||||
|
||||
#[derive(Default, Derivative, Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct CommandBody {
|
||||
pub struct MovieCommandBody {
|
||||
pub name: String,
|
||||
pub movie_ids: Vec<u64>,
|
||||
}
|
||||
|
||||
#[derive(Default, Derivative, Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct CommandBody {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Eq, Clone, Debug)]
|
||||
pub enum MinimumAvailability {
|
||||
#[default]
|
||||
|
||||
Reference in New Issue
Block a user