THSENT35O3PIXQ343QPPE3DJGR4YVULN6YPS5ETW5PXSVGZZQIZAC
ZYS43ILR4OXI7S2AYNGYSTK3IU2UVELIWVCCWDS7RVZQDSNJMDHQC
XIHPYOWDLQY2MVMVUQPH23O3TBALRG4G2CHSLWSCAYMY5NVJ32WQC
UIMZBURR7KOWSREO4GDH5C2LZDUTEZBKQNYWBYSFGUTRYJ4GKSNQC
Y6BVNXQ747WQKVB4JO3AHYOMBWNNJNPC6SG2UUCCZRIIXDMXJYDQC
J64KBLKALQ3HQCY4HJU5H6WBXTATS7TKBYNNUUSNJE7JLWLYO66QC
6FJACP6KUOZ4HWK4PSS5PFPGDYXZSCAWSKIARWBDGCZTPJWXA62AC
5GQNHICLSFAA7ZUFXUCNACCPAIIGK4DV2QPTONDNXLS4TJJTOFHAC
BSPWOOHZMN3RAOHGJ2A3XKUOUCFFAOXS7YR67E3AARPPPIA5YPDAC
SBPKWZNQF5BWAJ7SZHWVK5BG6DTVJNDYND6UG5PDZCWZ2W4W2HXQC
H5MQEP35FJNDLARTAB7J5GEHRNBSL6RTHFUGURG5HIVGLCG4FGUAC
}
}
pub fn download_range(state: &State, p_search: &str, e_search: &str) {
let re_pod = Regex::new(p_search).unwrap();
let input = String::from(e_search);
let range: Vec<usize> = input
.split('-')
.map(|i| i.parse::<usize>().unwrap())
.collect();
for subscription in state.subscriptions() {
if re_pod.is_match(&subscription.name) {
let podcast = Podcast::from_url(&subscription.url).unwrap();
let episodes = podcast.episodes();
&episodes[episodes.len() - range[1]..episodes.len() - range[0]]
.par_iter()
.for_each(|ref ep| if let Err(err) = ep.download(podcast.title()) {
println!("{}", err);
});
}