Add proxy flag (#142)

This commit is contained in:
ByteDream 2023-04-11 21:14:06 +02:00 committed by ByteDream
parent 5f98cfb186
commit d33e2fa36b
4 changed files with 47 additions and 5 deletions

View file

@ -1,6 +1,11 @@
use crate::utils::parse::parse_resolution;
use crunchyroll_rs::media::Resolution;
use reqwest::Proxy;
pub fn clap_parse_resolution(s: &str) -> Result<Resolution, String> {
parse_resolution(s.to_string()).map_err(|e| e.to_string())
}
pub fn clap_parse_proxy(s: &str) -> Result<Proxy, String> {
Proxy::all(s).map_err(|e| e.to_string())
}