Re-organized providers and added a few
This commit is contained in:
@@ -67,6 +67,8 @@ pub struct FullArtistDetail {
|
||||
pub artist_photo: Option<String>,
|
||||
#[serde(default)]
|
||||
pub artist_bio: Option<String>,
|
||||
#[serde(default)]
|
||||
pub artist_banner: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
|
||||
@@ -176,6 +178,10 @@ pub struct YtAuthStatus {
|
||||
pub ytdlp_latest: Option<String>,
|
||||
#[serde(default)]
|
||||
pub ytdlp_update_available: bool,
|
||||
#[serde(default)]
|
||||
pub lastfm_api_key_set: bool,
|
||||
#[serde(default)]
|
||||
pub fanart_api_key_set: bool,
|
||||
}
|
||||
|
||||
// --- Downloads ---
|
||||
@@ -289,6 +295,8 @@ pub struct AppConfig {
|
||||
pub download: DownloadConfigFe,
|
||||
#[serde(default)]
|
||||
pub indexing: IndexingConfigFe,
|
||||
#[serde(default)]
|
||||
pub metadata: MetadataConfigFe,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
|
||||
@@ -341,3 +349,45 @@ pub struct IndexingConfigFe {
|
||||
#[serde(default)]
|
||||
pub concurrency: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct MetadataConfigFe {
|
||||
#[serde(default = "default_metadata_source")]
|
||||
pub metadata_source: String,
|
||||
#[serde(default = "default_artist_image_source")]
|
||||
pub artist_image_source: String,
|
||||
#[serde(default = "default_artist_bio_source")]
|
||||
pub artist_bio_source: String,
|
||||
#[serde(default = "default_lyrics_source")]
|
||||
pub lyrics_source: String,
|
||||
#[serde(default = "default_cover_art_source")]
|
||||
pub cover_art_source: String,
|
||||
}
|
||||
|
||||
impl Default for MetadataConfigFe {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
metadata_source: default_metadata_source(),
|
||||
artist_image_source: default_artist_image_source(),
|
||||
artist_bio_source: default_artist_bio_source(),
|
||||
lyrics_source: default_lyrics_source(),
|
||||
cover_art_source: default_cover_art_source(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn default_metadata_source() -> String {
|
||||
"musicbrainz".into()
|
||||
}
|
||||
fn default_artist_image_source() -> String {
|
||||
"wikipedia".into()
|
||||
}
|
||||
fn default_artist_bio_source() -> String {
|
||||
"wikipedia".into()
|
||||
}
|
||||
fn default_lyrics_source() -> String {
|
||||
"lrclib".into()
|
||||
}
|
||||
fn default_cover_art_source() -> String {
|
||||
"coverartarchive".into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user