mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Login procedure fix
This commit is contained in:
parent
cb8597db66
commit
b380ae160a
6 changed files with 31 additions and 39 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue