diff --git a/src/anime/player.rs b/src/anime/player.rs index f5f36dc..284f24d 100644 --- a/src/anime/player.rs +++ b/src/anime/player.rs @@ -1,6 +1,10 @@ pub fn open_video(link: (String, String)) { + let title = link.1; + let title = title.replace("-", " "); + let arg: String = format!("--force-media-title={}", title); let _ = std::process::Command::new("mpv") .arg(link.0) + .arg(arg) .output() .expect("failed to open mpv"); diff --git a/src/anime/scraper.rs b/src/anime/scraper.rs index a4e6edf..f643c54 100644 --- a/src/anime/scraper.rs +++ b/src/anime/scraper.rs @@ -79,7 +79,7 @@ pub fn anime_link(title: &str, ep: u64) -> (String, String) { .as_str() .trim() .to_string(); - let title = format!("{} episode {}", title.replace('-', " "), ep); + let title = format!("{} Episode {}", title.replace('-', " "), ep); let encoded_id1 = encode(&id1); let anime_id = encode(format!("{}LTXs3GrU8we9O{}", id1, encoded_id1)); let html = format!("https://animixplay.to/api/live{}", anime_id);