mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-01-31 22:53:37 +00:00
Login procedure fix
This commit is contained in:
@@ -8,16 +8,8 @@ public class SubsonicPreferences {
|
||||
private String serverUrl;
|
||||
private String username;
|
||||
private String clientName = "Play for Subsonic";
|
||||
|
||||
private SubsonicAuthentication authentication;
|
||||
|
||||
public SubsonicPreferences(String serverUrl, String username, String password, String token, String salt) {
|
||||
this.serverUrl = serverUrl;
|
||||
this.username = username;
|
||||
if(password != null) this.authentication = new SubsonicAuthentication(password);
|
||||
if(token != null && salt != null) this.authentication = new SubsonicAuthentication(token, salt);
|
||||
}
|
||||
|
||||
public String getServerUrl() {
|
||||
return serverUrl;
|
||||
}
|
||||
@@ -34,8 +26,21 @@ public class SubsonicPreferences {
|
||||
return authentication;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
authentication.update(password);
|
||||
public void setServerUrl(String serverUrl) {
|
||||
this.serverUrl = serverUrl;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public void setClientName(String clientName) {
|
||||
this.clientName = clientName;
|
||||
}
|
||||
|
||||
public void setAuthentication(String password, String token, String salt) {
|
||||
if(password != null) this.authentication = new SubsonicAuthentication(password);
|
||||
if(token != null && salt != null) this.authentication = new SubsonicAuthentication(token, salt);
|
||||
}
|
||||
|
||||
public static class SubsonicAuthentication {
|
||||
|
||||
Reference in New Issue
Block a user