aboutsummaryrefslogtreecommitdiffstats
path: root/src/scrobbler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/scrobbler.rs')
-rw-r--r--src/scrobbler.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/scrobbler.rs b/src/scrobbler.rs
index 40d3ce6..e6e8a73 100644
--- a/src/scrobbler.rs
+++ b/src/scrobbler.rs
@@ -8,6 +8,7 @@
8use md5::{Digest, Md5}; 8use md5::{Digest, Md5};
9use reqwest::blocking::Client; 9use reqwest::blocking::Client;
10use std::collections::BTreeMap; 10use std::collections::BTreeMap;
11use std::time::Duration;
11 12
12pub struct Scrobbler { 13pub struct Scrobbler {
13 pub lastfm_api_key: Option<String>, 14 pub lastfm_api_key: Option<String>,
@@ -33,7 +34,11 @@ impl Scrobbler {
33 lastfm_api_secret, 34 lastfm_api_secret,
34 lastfm_session_key, 35 lastfm_session_key,
35 listenbrainz_token, 36 listenbrainz_token,
36 client: Client::new(), 37 client: Client::builder()
38 .connect_timeout(Duration::from_secs(10))
39 .timeout(Duration::from_secs(30))
40 .build()
41 .expect("valid reqwest Client"),
37 } 42 }
38 } 43 }
39 44