Clean things up a bit
This commit is contained in:
parent
a91e243ecc
commit
3275f4890d
18 changed files with 572 additions and 249 deletions
|
|
@ -1,7 +1,8 @@
|
|||
use crate::app::Enableable;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Configuration for the Transmission action
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TransmissionConfig {
|
||||
pub enable: bool,
|
||||
pub host: String,
|
||||
|
|
@ -10,3 +11,9 @@ pub struct TransmissionConfig {
|
|||
pub port: u16,
|
||||
pub download_dir: String,
|
||||
}
|
||||
|
||||
impl Enableable for TransmissionConfig {
|
||||
fn is_enabled(&self) -> bool {
|
||||
self.enable
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue