2025-08-29 21:46:22 +10:00
|
|
|
use std::path;
|
|
|
|
|
|
|
|
|
|
use sanitise_file_name::sanitise;
|
|
|
|
|
|
2025-09-21 09:07:18 +10:00
|
|
|
pub(crate) const SPEC_FILE: &str = "spec.toml";
|
|
|
|
|
pub(crate) const LOCAL_PODCASTS_DIR: &str = "podcasts";
|
|
|
|
|
pub(crate) const LOCAL_PLAYLISTS_DIR: &str = "playlists";
|
|
|
|
|
|
|
|
|
|
pub(crate) const IPOD_PODCASTS_DIR: &str = "Podcasts";
|
|
|
|
|
|
|
|
|
|
pub(crate) const LISTENED_PLAYLIST_PATH: &str = "[PC] [Listened].m3u";
|
|
|
|
|
pub(crate) const MASTER_PLAYLIST_PATH: &str = "[PC] [Master Feed].m3u";
|
2025-08-29 21:46:22 +10:00
|
|
|
|
|
|
|
|
pub(crate) fn podcast_folder(
|
|
|
|
|
root: &path::Path,
|
|
|
|
|
alias: &str,
|
|
|
|
|
) -> path::PathBuf {
|
2025-09-21 09:07:18 +10:00
|
|
|
root.join(LOCAL_PODCASTS_DIR).join(sanitise(alias))
|
2025-08-29 21:46:22 +10:00
|
|
|
}
|