Use p= authentication parameter when authMethod is false.
This commit is contained in:
parent
4254c8ad9f
commit
5141eb6e81
|
@ -323,6 +323,9 @@ public final class Util {
|
|||
builder.addPathSegment("rest");
|
||||
builder.addPathSegment(method + ".view");
|
||||
|
||||
builder.addQueryParameter("u", username);
|
||||
|
||||
if (prefs.getBoolean(Constants.PREFERENCES_KEY_AUTH_METHOD, true)) {
|
||||
int hash = (username + password).hashCode();
|
||||
Pair<String, String> values = tokens.get(hash);
|
||||
if (values == null) {
|
||||
|
@ -332,9 +335,12 @@ public final class Util {
|
|||
tokens.put(hash, values);
|
||||
}
|
||||
|
||||
builder.addQueryParameter("u", username);
|
||||
builder.addQueryParameter("s", values.getFirst());
|
||||
builder.addQueryParameter("t", values.getSecond());
|
||||
} else {
|
||||
builder.addQueryParameter("p", password);
|
||||
}
|
||||
|
||||
builder.addQueryParameter("v", Constants.REST_PROTOCOL_VERSION_SUBSONIC);
|
||||
builder.addQueryParameter("c", Constants.REST_CLIENT_ID);
|
||||
|
||||
|
|
Loading…
Reference in New Issue