B:BD[
4.21123] → [
4.21123:21204]
if let (Some(mut title), Some(url)) = (episode.title(), episode.url()) {
let pattern = state.config.filename_pattern.as_ref();
if let (Some(title), Some(url)) = (episode.title(), episode.url()) {
let mut filename = "".to_string();
if let Some(pattern) = pattern {
filename = pattern.replace("{title}", &title);
filename = pattern.replace(
"{number}",
&podcast
.episodes()
.iter()
.position(|e| e == episode)
.map(|x| x.to_string())
.unwrap_or_else(|| "".into()),
);
} else {
filename = title.clone();
}