Minimal subsonic functionality
This commit is contained in:
@@ -38,6 +38,9 @@ pub struct AppConfig {
|
||||
|
||||
#[serde(default)]
|
||||
pub scheduling: SchedulingConfig,
|
||||
|
||||
#[serde(default)]
|
||||
pub subsonic: SubsonicConfig,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -152,6 +155,26 @@ pub struct SchedulingConfig {
|
||||
pub monitor_interval_hours: u32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct SubsonicConfig {
|
||||
/// Whether the Subsonic API is enabled.
|
||||
#[serde(default = "default_true")]
|
||||
pub enabled: bool,
|
||||
|
||||
/// Whether transcoding via ffmpeg is enabled.
|
||||
#[serde(default = "default_true")]
|
||||
pub transcoding_enabled: bool,
|
||||
}
|
||||
|
||||
impl Default for SubsonicConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enabled: true,
|
||||
transcoding_enabled: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for SchedulingConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
@@ -179,6 +202,7 @@ impl Default for AppConfig {
|
||||
indexing: IndexingConfig::default(),
|
||||
metadata: MetadataConfig::default(),
|
||||
scheduling: SchedulingConfig::default(),
|
||||
subsonic: SubsonicConfig::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user