feat(network): Support for adding a root folder to Sonarr
This commit is contained in:
@@ -56,11 +56,6 @@ pub struct AddOptions {
|
||||
pub search_for_movie: bool,
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize, Debug)]
|
||||
pub struct AddRootFolderBody {
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
pub struct BlocklistResponse {
|
||||
pub records: Vec<BlocklistItem>,
|
||||
|
||||
@@ -21,6 +21,7 @@ mod sonarr_data_tests;
|
||||
pub struct SonarrData {
|
||||
pub blocklist: StatefulTable<BlocklistItem>,
|
||||
pub downloads: StatefulTable<DownloadRecord>,
|
||||
pub edit_root_folder: Option<HorizontallyScrollableText>,
|
||||
pub history: StatefulTable<SonarrHistoryItem>,
|
||||
pub indexers: StatefulTable<Indexer>,
|
||||
pub indexer_settings: Option<IndexerSettings>,
|
||||
@@ -41,6 +42,7 @@ impl Default for SonarrData {
|
||||
SonarrData {
|
||||
blocklist: StatefulTable::default(),
|
||||
downloads: StatefulTable::default(),
|
||||
edit_root_folder: None,
|
||||
history: StatefulTable::default(),
|
||||
indexers: StatefulTable::default(),
|
||||
indexer_settings: None,
|
||||
|
||||
@@ -36,6 +36,7 @@ mod tests {
|
||||
|
||||
assert!(sonarr_data.blocklist.is_empty());
|
||||
assert!(sonarr_data.downloads.is_empty());
|
||||
assert!(sonarr_data.edit_root_folder.is_none());
|
||||
assert!(sonarr_data.history.is_empty());
|
||||
assert!(sonarr_data.indexers.is_empty());
|
||||
assert!(sonarr_data.indexer_settings.is_none());
|
||||
|
||||
@@ -11,6 +11,11 @@ use super::HorizontallyScrollableText;
|
||||
#[path = "servarr_models_tests.rs"]
|
||||
mod servarr_models_tests;
|
||||
|
||||
#[derive(Default, Serialize, Debug)]
|
||||
pub struct AddRootFolderBody {
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, PartialEq, Eq, Clone, Copy, Debug, ValueEnum)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum AuthenticationMethod {
|
||||
|
||||
Reference in New Issue
Block a user