made kami compatible with trackma

This commit is contained in:
Zastian Pretorius
2022-07-28 22:50:44 +01:00
parent dcc57d22a9
commit 7f34f62f5d
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,10 @@
pub fn open_video(link: (String, String)) { 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") let _ = std::process::Command::new("mpv")
.arg(link.0) .arg(link.0)
.arg(arg)
.output() .output()
.expect("failed to open mpv"); .expect("failed to open mpv");

View File

@@ -79,7 +79,7 @@ pub fn anime_link(title: &str, ep: u64) -> (String, String) {
.as_str() .as_str()
.trim() .trim()
.to_string(); .to_string();
let title = format!("{} episode {}", title.replace('-', " "), ep); let title = format!("{} Episode {}", title.replace('-', " "), ep);
let encoded_id1 = encode(&id1); let encoded_id1 = encode(&id1);
let anime_id = encode(format!("{}LTXs3GrU8we9O{}", id1, encoded_id1)); let anime_id = encode(format!("{}LTXs3GrU8we9O{}", id1, encoded_id1));
let html = format!("https://animixplay.to/api/live{}", anime_id); let html = format!("https://animixplay.to/api/live{}", anime_id);