mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Merge pull request #954 from JasonLG1979/remove-dep-warning
Remove basic normalisation deprecation warning
This commit is contained in:
commit
f4be9bb85d
1 changed files with 2 additions and 16 deletions
18
src/main.rs
18
src/main.rs
|
@ -1293,12 +1293,7 @@ fn get_setup() -> Setup {
|
||||||
normalisation_method = opt_str(NORMALISATION_METHOD)
|
normalisation_method = opt_str(NORMALISATION_METHOD)
|
||||||
.as_deref()
|
.as_deref()
|
||||||
.map(|method| {
|
.map(|method| {
|
||||||
warn!(
|
NormalisationMethod::from_str(method).unwrap_or_else(|_| {
|
||||||
"`--{}` / `-{}` will be deprecated in a future release.",
|
|
||||||
NORMALISATION_METHOD, NORMALISATION_METHOD_SHORT
|
|
||||||
);
|
|
||||||
|
|
||||||
let method = NormalisationMethod::from_str(method).unwrap_or_else(|_| {
|
|
||||||
invalid_error_msg(
|
invalid_error_msg(
|
||||||
NORMALISATION_METHOD,
|
NORMALISATION_METHOD,
|
||||||
NORMALISATION_METHOD_SHORT,
|
NORMALISATION_METHOD_SHORT,
|
||||||
|
@ -1308,16 +1303,7 @@ fn get_setup() -> Setup {
|
||||||
);
|
);
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
});
|
})
|
||||||
|
|
||||||
if matches!(method, NormalisationMethod::Basic) {
|
|
||||||
warn!(
|
|
||||||
"`--{}` / `-{}` {:?} will be deprecated in a future release.",
|
|
||||||
NORMALISATION_METHOD, NORMALISATION_METHOD_SHORT, method
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
method
|
|
||||||
})
|
})
|
||||||
.unwrap_or(player_default_config.normalisation_method);
|
.unwrap_or(player_default_config.normalisation_method);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue