mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Optimized imports
This commit is contained in:
parent
8d517ae3e0
commit
0827fc10a9
80 changed files with 130 additions and 269 deletions
|
|
@ -8,7 +8,6 @@ import com.cappielloantonio.play.subsonic.api.playlist.PlaylistClient;
|
|||
import com.cappielloantonio.play.subsonic.api.searching.SearchingClient;
|
||||
import com.cappielloantonio.play.subsonic.api.system.SystemClient;
|
||||
import com.cappielloantonio.play.subsonic.base.Version;
|
||||
import com.cappielloantonio.play.subsonic.models.Playlist;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@ public class SubsonicPreferences {
|
|||
}
|
||||
|
||||
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);
|
||||
if (password != null) this.authentication = new SubsonicAuthentication(password);
|
||||
if (token != null && salt != null)
|
||||
this.authentication = new SubsonicAuthentication(token, salt);
|
||||
}
|
||||
|
||||
public static class SubsonicAuthentication {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Log;
|
|||
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.TikXml;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Log;
|
|||
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.TikXml;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Log;
|
|||
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.TikXml;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Log;
|
|||
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.TikXml;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Log;
|
|||
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.TikXml;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Log;
|
|||
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.TikXml;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Log;
|
|||
|
||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.TikXml;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.cappielloantonio.play.subsonic.base;
|
||||
|
||||
public class SubsonicIncompatibilityException extends RuntimeException{
|
||||
public class SubsonicIncompatibilityException extends RuntimeException {
|
||||
private final Version serverApiVersion;
|
||||
private final Version minClientApiVersion;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.tickaroo.tikxml.annotation.Attribute;
|
|||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
import com.tickaroo.tikxml.converters.date.rfc3339.DateRfc3339TypeConverter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Xml(name = "album")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
public class AlbumWithSongsID3 extends AlbumID3 {
|
||||
@Element(name = "song")
|
||||
protected List<Child> songs;
|
||||
|
||||
|
||||
public List<Child> getSongs() {
|
||||
if (songs == null) {
|
||||
songs = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.tickaroo.tikxml.annotation.Attribute;
|
|||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
import com.tickaroo.tikxml.converters.date.rfc3339.DateRfc3339TypeConverter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Xml(name = "artist")
|
||||
|
|
@ -19,19 +18,19 @@ public class ArtistID3 {
|
|||
protected int albumCount;
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date starred;
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
|
@ -39,7 +38,7 @@ public class ArtistID3 {
|
|||
public String getCoverArtId() {
|
||||
return coverArtId;
|
||||
}
|
||||
|
||||
|
||||
public void setCoverArtId(String value) {
|
||||
this.coverArtId = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class ArtistInfoBase {
|
|||
public void setMediumImageUrl(String value) {
|
||||
this.mediumImageUrl = value;
|
||||
}
|
||||
|
||||
|
||||
public String getLargeImageUrl() {
|
||||
return largeImageUrl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public class MusicFolder {
|
|||
protected int id;
|
||||
@Attribute
|
||||
protected String name;
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -17,11 +17,11 @@ public class MusicFolder {
|
|||
public void setId(int value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Attribute;
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
import com.tickaroo.tikxml.converters.date.rfc3339.DateRfc3339TypeConverter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -33,7 +31,7 @@ public class Playlist {
|
|||
protected Date changed;
|
||||
@Attribute
|
||||
protected String coverArtId;
|
||||
|
||||
|
||||
public List<String> getAllowedUsers() {
|
||||
if (allowedUsers == null) {
|
||||
allowedUsers = new ArrayList<>();
|
||||
|
|
@ -48,7 +46,7 @@ public class Playlist {
|
|||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
|
@ -56,7 +54,7 @@ public class Playlist {
|
|||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
|
@ -72,7 +70,7 @@ public class Playlist {
|
|||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
|
||||
public void setOwner(String value) {
|
||||
this.owner = value;
|
||||
}
|
||||
|
|
@ -88,19 +86,19 @@ public class Playlist {
|
|||
public int getSongCount() {
|
||||
return songCount;
|
||||
}
|
||||
|
||||
|
||||
public void setSongCount(int value) {
|
||||
this.songCount = value;
|
||||
}
|
||||
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
|
||||
public void setDuration(int value) {
|
||||
this.duration = value;
|
||||
}
|
||||
|
||||
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
|
@ -108,7 +106,7 @@ public class Playlist {
|
|||
public void setCreated(Date value) {
|
||||
this.created = value;
|
||||
}
|
||||
|
||||
|
||||
public Date getChanged() {
|
||||
return changed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,21 +14,21 @@ public class SearchResult2 {
|
|||
protected List<Child> albums;
|
||||
@Element(name = "song")
|
||||
protected List<Child> songs;
|
||||
|
||||
|
||||
public List<Artist> getArtists() {
|
||||
if (artists == null) {
|
||||
artists = new ArrayList<>();
|
||||
}
|
||||
return this.artists;
|
||||
}
|
||||
|
||||
|
||||
public List<Child> getAlbums() {
|
||||
if (albums == null) {
|
||||
albums = new ArrayList<>();
|
||||
}
|
||||
return this.albums;
|
||||
}
|
||||
|
||||
|
||||
public List<Child> getSongs() {
|
||||
if (songs == null) {
|
||||
songs = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -14,14 +14,14 @@ public class SearchResult3 {
|
|||
protected List<AlbumID3> albums;
|
||||
@Element(name = "song")
|
||||
protected List<Child> songs;
|
||||
|
||||
|
||||
public List<ArtistID3> getArtists() {
|
||||
if (artists == null) {
|
||||
artists = new ArrayList<>();
|
||||
}
|
||||
return this.artists;
|
||||
}
|
||||
|
||||
|
||||
public List<AlbumID3> getAlbums() {
|
||||
if (albums == null) {
|
||||
albums = new ArrayList<>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue