mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 12:50:32 +00:00
made image path dinamic
This commit is contained in:
@@ -86,11 +86,11 @@ pub fn get_anime_link(url: &str, episode: u64) -> String {
|
||||
link.to_string()
|
||||
}
|
||||
|
||||
pub fn get_image(url: &str) {
|
||||
pub fn get_image(url: &str, path: &str) {
|
||||
let url = url;
|
||||
let mut response = isahc::get(url).unwrap();
|
||||
let mut buffer = Vec::new();
|
||||
response.copy_to(&mut buffer).unwrap();
|
||||
let mut file = File::create("/home/mrfluffy/.config/kami/temp.png").unwrap();
|
||||
let mut file = File::create(path).unwrap();
|
||||
file.write_all(&buffer).unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user