Skip to content

Commit 5764f1f

Browse files
authored
Merge pull request #783 from roderickvd/remove-fallback-accesspoint
Remove feature gate around `apresolve` See: hrkfdn/ncspot#535
2 parents 33c07f0 + 7c975f8 commit 5764f1f

4 files changed

Lines changed: 4 additions & 20 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ version = "0.2.0"
3131
[dependencies.librespot-core]
3232
path = "core"
3333
version = "0.2.0"
34-
features = ["apresolve"]
3534

3635
[dependencies.librespot-discovery]
3736
path = "discovery"

core/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ futures-util = { version = "0.3", default-features = false, features = ["alloc",
2323
hmac = "0.11"
2424
httparse = "1.3"
2525
http = "0.2"
26-
hyper = { version = "0.14", optional = true, features = ["client", "tcp", "http1"] }
27-
hyper-proxy = { version = "0.9.1", optional = true, default-features = false }
26+
hyper = { version = "0.14", features = ["client", "tcp", "http1"] }
27+
hyper-proxy = { version = "0.9.1", default-features = false }
2828
log = "0.4"
2929
num-bigint = { version = "0.4", features = ["rand"] }
3030
num-integer = "0.1"
@@ -52,6 +52,3 @@ vergen = "3.0.4"
5252
[dev-dependencies]
5353
env_logger = "0.8"
5454
tokio = {version = "1.0", features = ["macros"] }
55-
56-
[features]
57-
apresolve = ["hyper", "hyper-proxy"]

core/src/apresolve.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ use hyper_proxy::{Intercept, Proxy, ProxyConnector};
66
use serde::Deserialize;
77
use url::Url;
88

9-
use super::AP_FALLBACK;
10-
119
const APRESOLVE_ENDPOINT: &str = "http://apresolve.spotify.com:80";
10+
const AP_FALLBACK: &str = "ap.spotify.com:443";
1211

1312
#[derive(Clone, Debug, Deserialize)]
1413
struct ApResolveData {

core/src/lib.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use librespot_protocol as protocol;
88
#[macro_use]
99
mod component;
1010

11+
mod apresolve;
1112
pub mod audio_key;
1213
pub mod authentication;
1314
pub mod cache;
@@ -24,15 +25,3 @@ pub mod spotify_id;
2425
#[doc(hidden)]
2526
pub mod util;
2627
pub mod version;
27-
28-
const AP_FALLBACK: &str = "ap.spotify.com:443";
29-
30-
#[cfg(feature = "apresolve")]
31-
mod apresolve;
32-
33-
#[cfg(not(feature = "apresolve"))]
34-
mod apresolve {
35-
pub async fn apresolve(_: Option<&url::Url>, _: Option<u16>) -> String {
36-
return super::AP_FALLBACK.into();
37-
}
38-
}

0 commit comments

Comments
 (0)