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h
podcast download <podcast name> --template "{title}-{number}"
```
- Add the ability to download episodes matching a regex using
```sh
podcast download <podcast name> --pattern ".*goldfish.*"
```
let podcast = matches.value_of("PODCAST").unwrap();
if let Some(template) = matches.value_of("template") {
let podcast = matches.get_one::<String>("PODCAST").unwrap();
if let Some(template) = matches.get_one::<String>("TEMPLATE") {
match matches.value_of("EPISODE") {
Some(ep) => {
if let Some(pattern) = matches.value_of("pattern") {
let regex = Regex::new(pattern)?;
to_download.append(
&mut download::download_matching(&mutable_state, podcast, ®ex).await?,
)
} else if String::from(ep).contains(|c| c == '-' || c == ',') {
to_download
.append(&mut download::download_range(&mutable_state, podcast, ep).await?);
} else if matches.occurrences_of("name") > 0 {
to_download.append(
&mut download::download_episode_by_name(
&mutable_state,
podcast,
ep,
0 < matches.occurrences_of("all"),
)
.await?,
);
} else {
to_download.append(
&mut download::download_episode_by_num(&mutable_state, podcast, ep).await?,
);
if let Some(pattern) = matches.get_one::<String>("PATTERN") {
let regex = Regex::new(pattern)?;
to_download.append(&mut download::download_matching(&mutable_state, podcast, ®ex).await?)
} else {
match matches.get_one::<String>("EPISODE") {
Some(ep) => {
if String::from(ep).contains(|c| c == '-' || c == ',') {
to_download
.append(&mut download::download_range(&mutable_state, podcast, ep).await?);
} else if matches.occurrences_of("NAME") > 0 {
to_download.append(
&mut download::download_episode_by_name(
&mutable_state,
podcast,
ep,
0 < matches.occurrences_of("ALL"),
)
.await?,
);
} else {
to_download.append(
&mut download::download_episode_by_num(&mutable_state, podcast, ep).await?,
);
}
None => match matches.value_of("latest") {
Some(num_of_latest) => {
to_download.append(
&mut download::download_latest(&mutable_state, podcast, num_of_latest.parse()?)
.await?,
);
}
None => {
to_download.append(&mut download::download_all(&mutable_state, podcast).await?);
}
},
const VERSION: &str = "0.19.3";