Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Sep 30, 2024
1 parent 7c051ae commit 40ad302
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,6 @@ fn get_setup() -> Setup {
"Spotify access token to sign in with. Use empty string to obtain token.",
"TOKEN",
)
.optopt(
ACCESS_TOKEN_SHORT,
ACCESS_TOKEN,
"Spotify access token to sign in with.",
"TOKEN",
)
.optopt(
OAUTH_PORT_SHORT,
OAUTH_PORT,
Expand Down Expand Up @@ -1479,19 +1473,6 @@ fn get_setup() -> Setup {
..SessionConfig::default()
};

let credentials = {
let cached_creds = cache.as_ref().and_then(Cache::credentials);

if let Some(mut access_token) = opt_str(TOKEN) {
Some(Credentials::with_access_token(access_token))
} else {
if cached_creds.is_some() {
trace!("Using cached credentials.");
}
cached_creds
}
};

let enable_discovery = !opt_present(DISABLE_DISCOVERY);

if credentials.is_none() && !enable_discovery {
Expand Down

0 comments on commit 40ad302

Please sign in to comment.