Clean things up a bit

This commit is contained in:
Marc Plano-Lesay 2025-05-02 14:23:12 +10:00
parent a91e243ecc
commit 3275f4890d
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF
18 changed files with 572 additions and 249 deletions

View file

@ -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
}
}