initial code for tag stripping and m3u generation

This commit is contained in:
Aaron Manning
2025-08-29 21:33:20 +10:00
parent 105a3eb892
commit cb47ff0cb8
6 changed files with 337 additions and 49 deletions

View File

@@ -1,5 +1,6 @@
mod rss;
mod input;
mod tagging;
mod download;
use input::{Command, ListenStatus};
@@ -28,7 +29,6 @@ fn main() -> anyhow::Result<()> {
anyhow::bail!("could not get parent of configuration path for root directory")
};
match args.command {
Command::Download { podcast } => {
// Updating single podcast
@@ -77,10 +77,18 @@ fn main() -> anyhow::Result<()> {
spec.write_to(&spec_file)?;
},
Command::Tag { podcast } => {
if let Some(alias) = podcast {
tagging::generate_m3u(alias.as_str(), root)?;
tagging::strip_tags(alias.as_str(), root)?;
} else {
for (alias, _) in config.podcasts {
tagging::generate_m3u(alias.as_str(), root)?;
tagging::strip_tags(alias.as_str(), root)?;
}
}
}
};
Ok(())
}