pub mod apod;
pub mod bing;
pub mod client;
pub mod earthview;
pub mod filesystem;
pub mod picsum;
pub mod reddit;
pub mod registry;
pub mod traits;
pub mod unsplash;
pub mod wallhaven;
use crate::config::Config;
use anyhow::Result;
use std::path::PathBuf;
#[derive(Debug, Clone, Default)]
pub struct DownloadOptions {
pub output_dir: Option<PathBuf>,
pub no_set: bool,
}
pub async fn download_from_source(source: &str, config: &Config, query: &[String], opts: &DownloadOptions) -> Result<traits::Wallpaper> {
let registry = registry::DownloaderRegistry::new();
let downloader = registry.get_downloader(source)?;
downloader.download(config, query, opts).await
}
pub fn list_sources() -> Vec<String> {
let registry = registry::DownloaderRegistry::new();
registry.list_sources()
}