Disabled http refers.

This commit is contained in:
Jordan Petridis
2017-11-07 10:28:04 +02:00
parent 86dac216d6
commit 4e6ed416ee
4 changed files with 17 additions and 14 deletions
+3 -1
View File
@@ -19,7 +19,8 @@ use hammond_data::{DL_DIR, HAMMOND_CACHE};
// But cant seem to find one.
pub fn download_to(target: &str, url: &str) -> Result<()> {
info!("GET request to: {}", url);
let mut resp = reqwest::get(url)?;
let client = reqwest::Client::builder().referer(false).build()?;
let mut resp = client.get(url).send()?;
info!("Status Resp: {}", resp.status());
if resp.status().is_success() {
@@ -133,6 +134,7 @@ pub fn get_episode(connection: &Database, ep: &mut Episode, download_folder: &st
if let Err(err) = res {
error!("Something whent wrong while downloading.");
error!("Error: {}", err);
return Err(err);
} else {
info!("Download of {} finished.", uri);
};