mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Sync libraries, artist, album, genre, song, playlist, playlist song
This commit is contained in:
parent
3a91ee68db
commit
304a5f078a
30 changed files with 716 additions and 1699 deletions
|
|
@ -1,7 +1,13 @@
|
|||
package com.cappielloantonio.play.subsonic;
|
||||
|
||||
import com.cappielloantonio.play.subsonic.api.albumsonglist.AlbumSongListClient;
|
||||
import com.cappielloantonio.play.subsonic.api.browsing.BrowsingClient;
|
||||
import com.cappielloantonio.play.subsonic.api.mediaretrieval.MediaRetrievalClient;
|
||||
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;
|
||||
|
|
@ -14,6 +20,11 @@ public class Subsonic {
|
|||
private Version apiVersion = API_MAX_VERSION;
|
||||
|
||||
private SystemClient systemClient;
|
||||
private BrowsingClient browsingClient;
|
||||
private MediaRetrievalClient mediaRetrievalClient;
|
||||
private PlaylistClient playlistClient;
|
||||
private SearchingClient searchingClient;
|
||||
private AlbumSongListClient albumSongListClient;
|
||||
|
||||
public Subsonic(SubsonicPreferences preferences) {
|
||||
this.preferences = preferences;
|
||||
|
|
@ -34,6 +45,41 @@ public class Subsonic {
|
|||
return systemClient;
|
||||
}
|
||||
|
||||
public BrowsingClient getBrowsingClient() {
|
||||
if (browsingClient == null) {
|
||||
browsingClient = new BrowsingClient(this);
|
||||
}
|
||||
return browsingClient;
|
||||
}
|
||||
|
||||
public MediaRetrievalClient getMediaRetrievalClient() {
|
||||
if (mediaRetrievalClient == null) {
|
||||
mediaRetrievalClient = new MediaRetrievalClient(this);
|
||||
}
|
||||
return mediaRetrievalClient;
|
||||
}
|
||||
|
||||
public PlaylistClient getPlaylistClient() {
|
||||
if (playlistClient == null) {
|
||||
playlistClient = new PlaylistClient(this);
|
||||
}
|
||||
return playlistClient;
|
||||
}
|
||||
|
||||
public SearchingClient getSearchingClient() {
|
||||
if (searchingClient == null) {
|
||||
searchingClient = new SearchingClient(this);
|
||||
}
|
||||
return searchingClient;
|
||||
}
|
||||
|
||||
public AlbumSongListClient getAlbumSongListClient() {
|
||||
if (albumSongListClient == null) {
|
||||
albumSongListClient = new AlbumSongListClient(this);
|
||||
}
|
||||
return albumSongListClient;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return preferences.getServerUrl() + "/rest/";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,14 +30,14 @@ public class AlbumSongListClient {
|
|||
this.albumSongListService = retrofit.create(AlbumSongListService.class);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> getAlbumList() {
|
||||
public Call<SubsonicResponse> getAlbumList(String type, int size, int offset) {
|
||||
Log.d(TAG, "getAlbumList()");
|
||||
return albumSongListService.getAlbumList(subsonic.getParams());
|
||||
return albumSongListService.getAlbumList(subsonic.getParams(), type, size, offset);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> getAlbumList2() {
|
||||
public Call<SubsonicResponse> getAlbumList2(String type, int size, int offset) {
|
||||
Log.d(TAG, "getAlbumList2()");
|
||||
return albumSongListService.getAlbumList2(subsonic.getParams());
|
||||
return albumSongListService.getAlbumList2(subsonic.getParams(), type, size, offset);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> getRandomSongs(int size) {
|
||||
|
|
@ -45,9 +45,9 @@ public class AlbumSongListClient {
|
|||
return albumSongListService.getRandomSongs(subsonic.getParams(), size);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> getSongsByGenre(String genre, int count) {
|
||||
public Call<SubsonicResponse> getSongsByGenre(String genre, int count, int offset) {
|
||||
Log.d(TAG, "getSongsByGenre()");
|
||||
return albumSongListService.getSongsByGenre(subsonic.getParams(), genre, count);
|
||||
return albumSongListService.getSongsByGenre(subsonic.getParams(), genre, count, offset);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> getNowPlaying() {
|
||||
|
|
|
|||
|
|
@ -6,20 +6,21 @@ import java.util.Map;
|
|||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface AlbumSongListService {
|
||||
@GET("getAlbumList?type=random")
|
||||
Call<SubsonicResponse> getAlbumList(@QueryMap Map<String, String> params);
|
||||
@GET("getAlbumList")
|
||||
Call<SubsonicResponse> getAlbumList(@QueryMap Map<String, String> params, @Query("type") String type, @Query("size") int size, @Query("offset") int offset);
|
||||
|
||||
@GET("getAlbumList2?type=random")
|
||||
Call<SubsonicResponse> getAlbumList2(@QueryMap Map<String, String> params);
|
||||
@GET("getAlbumList2")
|
||||
Call<SubsonicResponse> getAlbumList2(@QueryMap Map<String, String> params, @Query("type") String type, @Query("size") int size, @Query("offset") int offset);
|
||||
|
||||
@GET("getRandomSongs?size={size}")
|
||||
Call<SubsonicResponse> getRandomSongs(@QueryMap Map<String, String> params, int size);
|
||||
@GET("getRandomSongs")
|
||||
Call<SubsonicResponse> getRandomSongs(@QueryMap Map<String, String> params, @Query("size") int size);
|
||||
|
||||
@GET("getSongsByGenre?genre={genre}?count={count}")
|
||||
Call<SubsonicResponse> getSongsByGenre(@QueryMap Map<String, String> params, String genre, int count);
|
||||
@GET("getSongsByGenre")
|
||||
Call<SubsonicResponse> getSongsByGenre(@QueryMap Map<String, String> params, @Query("genre") String genre, @Query("count") int count, @Query("offset") int offset);
|
||||
|
||||
@GET("getNowPlaying")
|
||||
Call<SubsonicResponse> getNowPlaying(@QueryMap Map<String, String> params);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import java.util.Map;
|
|||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface BrowsingService {
|
||||
|
|
@ -15,8 +16,8 @@ public interface BrowsingService {
|
|||
@GET("getIndexes")
|
||||
Call<SubsonicResponse> getIndexes(@QueryMap Map<String, String> params);
|
||||
|
||||
@GET("getMusicDirectory?id={id}")
|
||||
Call<SubsonicResponse> getMusicDirectory(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getMusicDirectory")
|
||||
Call<SubsonicResponse> getMusicDirectory(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getGenres")
|
||||
Call<SubsonicResponse> getGenres(@QueryMap Map<String, String> params);
|
||||
|
|
@ -24,39 +25,39 @@ public interface BrowsingService {
|
|||
@GET("getArtists")
|
||||
Call<SubsonicResponse> getArtists(@QueryMap Map<String, String> params);
|
||||
|
||||
@GET("getArtist?id={id}")
|
||||
Call<SubsonicResponse> getArtist(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getArtist")
|
||||
Call<SubsonicResponse> getArtist(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getAlbum?id={id}")
|
||||
Call<SubsonicResponse> getAlbum(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getAlbum")
|
||||
Call<SubsonicResponse> getAlbum(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getSong?id={id}")
|
||||
Call<SubsonicResponse> getSong(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getSong")
|
||||
Call<SubsonicResponse> getSong(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getVideos")
|
||||
Call<SubsonicResponse> getVideos(@QueryMap Map<String, String> params);
|
||||
|
||||
@GET("getVideoInfo?id={id}")
|
||||
Call<SubsonicResponse> getVideoInfo(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getVideoInfo")
|
||||
Call<SubsonicResponse> getVideoInfo(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getArtistInfo?id={id}")
|
||||
Call<SubsonicResponse> getArtistInfo(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getArtistInfo")
|
||||
Call<SubsonicResponse> getArtistInfo(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getArtistInfo2?id={id}")
|
||||
Call<SubsonicResponse> getArtistInfo2(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getArtistInfo2")
|
||||
Call<SubsonicResponse> getArtistInfo2(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getAlbumInfo?id={id}")
|
||||
Call<SubsonicResponse> getAlbumInfo(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getAlbumInfo")
|
||||
Call<SubsonicResponse> getAlbumInfo(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getAlbumInfo2?id={id}")
|
||||
Call<SubsonicResponse> getAlbumInfo2(@QueryMap Map<String, String> params, String id);
|
||||
@GET("getAlbumInfo2")
|
||||
Call<SubsonicResponse> getAlbumInfo2(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("getSimilarSongs?id={id}?count={count}")
|
||||
Call<SubsonicResponse> getSimilarSongs(@QueryMap Map<String, String> params, String id, int count);
|
||||
@GET("getSimilarSongs")
|
||||
Call<SubsonicResponse> getSimilarSongs(@QueryMap Map<String, String> params, @Query("id") String id, @Query("count") int count);
|
||||
|
||||
@GET("getSimilarSongs2?id={id}?count={count}")
|
||||
Call<SubsonicResponse> getSimilarSongs2(@QueryMap Map<String, String> params, String id, int count);
|
||||
@GET("getSimilarSongs2")
|
||||
Call<SubsonicResponse> getSimilarSongs2(@QueryMap Map<String, String> params, @Query("id") String id, @Query("count") int count);
|
||||
|
||||
@GET("getTopSongs?id={id}?count={count}")
|
||||
Call<SubsonicResponse> getTopSongs(@QueryMap Map<String, String> params, String id, int count);
|
||||
@GET("getTopSongs")
|
||||
Call<SubsonicResponse> getTopSongs(@QueryMap Map<String, String> params, @Query("id") String id, @Query("count") int count);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,247 +1,132 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
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")
|
||||
public class AlbumID3 {
|
||||
@Attribute
|
||||
protected String id;
|
||||
@Attribute
|
||||
protected String name;
|
||||
@Attribute
|
||||
protected String artist;
|
||||
@Attribute
|
||||
protected String artistId;
|
||||
@Attribute
|
||||
protected String coverArtId;
|
||||
@Attribute
|
||||
protected int songCount;
|
||||
@Attribute
|
||||
protected int duration;
|
||||
@Attribute
|
||||
protected Long playCount;
|
||||
protected LocalDateTime created;
|
||||
protected LocalDateTime starred;
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date created;
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date starred;
|
||||
@Attribute
|
||||
protected Integer year;
|
||||
@Attribute
|
||||
protected String genre;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the artist property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getArtist() {
|
||||
return artist;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the artist property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setArtist(String value) {
|
||||
this.artist = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the artistId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getArtistId() {
|
||||
return artistId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the artistId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setArtistId(String value) {
|
||||
this.artistId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the coverArtId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getCoverArtId() {
|
||||
return coverArtId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the coverArtId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setCoverArtId(String value) {
|
||||
this.coverArtId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the songCount property.
|
||||
*/
|
||||
public int getSongCount() {
|
||||
return songCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the songCount property.
|
||||
*/
|
||||
public void setSongCount(int value) {
|
||||
this.songCount = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the duration property.
|
||||
*/
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the duration property.
|
||||
*/
|
||||
public void setDuration(int value) {
|
||||
this.duration = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the playCount property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public Long getPlayCount() {
|
||||
return playCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the playCount property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public void setPlayCount(Long value) {
|
||||
this.playCount = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the created property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public LocalDateTime getCreated() {
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the created property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setCreated(LocalDateTime value) {
|
||||
public void setCreated(Date value) {
|
||||
this.created = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the starred property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public LocalDateTime getStarred() {
|
||||
public Date getStarred() {
|
||||
return starred;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the starred property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setStarred(LocalDateTime value) {
|
||||
public void setStarred(Date value) {
|
||||
this.starred = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the year property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the year property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setYear(Integer value) {
|
||||
this.year = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the genre property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getGenre() {
|
||||
return genre;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the genre property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setGenre(String value) {
|
||||
this.genre = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,24 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class AlbumList2 {
|
||||
@Element
|
||||
protected List<AlbumID3> albums;
|
||||
|
||||
/**
|
||||
* Gets the value of the albums property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the albums property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAlbums().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link AlbumID3 }
|
||||
*/
|
||||
public List<AlbumID3> getAlbums() {
|
||||
if (albums == null) {
|
||||
albums = new ArrayList<AlbumID3>();
|
||||
albums = new ArrayList<>();
|
||||
}
|
||||
return this.albums;
|
||||
}
|
||||
|
||||
public void setAlbums(List<AlbumID3> albums) {
|
||||
this.albums = albums;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,24 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class AlbumWithSongsID3 extends AlbumID3 {
|
||||
@Element(name = "song")
|
||||
protected List<Child> songs;
|
||||
|
||||
/**
|
||||
* Gets the value of the songs property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the songs property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getSongs().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Child }
|
||||
*/
|
||||
|
||||
public List<Child> getSongs() {
|
||||
if (songs == null) {
|
||||
songs = new ArrayList<Child>();
|
||||
songs = new ArrayList<>();
|
||||
}
|
||||
return this.songs;
|
||||
}
|
||||
|
||||
public void setSongs(List<Child> songs) {
|
||||
this.songs = songs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,105 +1,65 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
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
|
||||
public class ArtistID3 {
|
||||
@Attribute
|
||||
protected String id;
|
||||
@Attribute
|
||||
protected String name;
|
||||
@Attribute(name = "coverArt")
|
||||
protected String coverArtId;
|
||||
@Attribute
|
||||
protected int albumCount;
|
||||
protected LocalDateTime starred;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date starred;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the coverArtId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getCoverArtId() {
|
||||
return coverArtId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the coverArtId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public void setCoverArtId(String value) {
|
||||
this.coverArtId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the albumCount property.
|
||||
*/
|
||||
|
||||
public int getAlbumCount() {
|
||||
return albumCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the albumCount property.
|
||||
*/
|
||||
|
||||
public void setAlbumCount(int value) {
|
||||
this.albumCount = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the starred property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public LocalDateTime getStarred() {
|
||||
public Date getStarred() {
|
||||
return starred;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the starred property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setStarred(LocalDateTime value) {
|
||||
public void setStarred(Date value) {
|
||||
this.starred = value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,55 +1,32 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class ArtistsID3 {
|
||||
@Element(name = "index")
|
||||
protected List<IndexID3> indices;
|
||||
protected String ignoredArticles;
|
||||
|
||||
/**
|
||||
* Gets the value of the indices property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the indices property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getIndices().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link IndexID3 }
|
||||
*/
|
||||
public List<IndexID3> getIndices() {
|
||||
if (indices == null) {
|
||||
indices = new ArrayList<IndexID3>();
|
||||
indices = new ArrayList<>();
|
||||
}
|
||||
return this.indices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the ignoredArticles property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setIndices(List<IndexID3> indices) {
|
||||
this.indices = indices;
|
||||
}
|
||||
|
||||
public String getIgnoredArticles() {
|
||||
return ignoredArticles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the ignoredArticles property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setIgnoredArticles(String value) {
|
||||
this.ignoredArticles = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,650 +1,322 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
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.util.Date;
|
||||
|
||||
@Xml
|
||||
public class Child {
|
||||
@Attribute
|
||||
protected String id;
|
||||
@Attribute(name = "parent")
|
||||
protected String parentId;
|
||||
@Attribute(name = "isDir")
|
||||
protected boolean dir;
|
||||
@Attribute
|
||||
protected String title;
|
||||
@Attribute
|
||||
protected String album;
|
||||
@Attribute
|
||||
protected String artist;
|
||||
@Attribute
|
||||
protected Integer track;
|
||||
@Attribute
|
||||
protected Integer year;
|
||||
@Attribute(name = "genre")
|
||||
protected String genre;
|
||||
@Attribute(name = "coverArt")
|
||||
protected String coverArtId;
|
||||
@Attribute
|
||||
protected Long size;
|
||||
@Attribute
|
||||
protected String contentType;
|
||||
@Attribute
|
||||
protected String suffix;
|
||||
@Attribute
|
||||
protected String transcodedContentType;
|
||||
@Attribute
|
||||
protected String transcodedSuffix;
|
||||
@Attribute
|
||||
protected Integer duration;
|
||||
@Attribute
|
||||
protected Integer bitRate;
|
||||
@Attribute
|
||||
protected String path;
|
||||
@Attribute(name = "isVideo")
|
||||
protected Boolean video;
|
||||
@Attribute
|
||||
protected Integer userRating;
|
||||
@Attribute
|
||||
protected Double averageRating;
|
||||
@Attribute
|
||||
protected Long playCount;
|
||||
@Attribute
|
||||
protected Integer discNumber;
|
||||
protected LocalDateTime created;
|
||||
protected LocalDateTime starred;
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date created;
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date starred;
|
||||
@Attribute
|
||||
protected String albumId;
|
||||
@Attribute
|
||||
protected String artistId;
|
||||
@Element
|
||||
protected MediaType type;
|
||||
@Attribute
|
||||
protected Long bookmarkPosition;
|
||||
@Attribute
|
||||
protected Integer originalWidth;
|
||||
@Attribute
|
||||
protected Integer originalHeight;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
@Attribute
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the parentId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the parentId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setParentId(String value) {
|
||||
this.parentId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the dir property.
|
||||
*/
|
||||
public boolean isDir() {
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the dir property.
|
||||
*/
|
||||
public void setDir(boolean value) {
|
||||
this.dir = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the title property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the title property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setTitle(String value) {
|
||||
this.title = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the album property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getAlbum() {
|
||||
return album;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the album property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setAlbum(String value) {
|
||||
this.album = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the artist property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getArtist() {
|
||||
return artist;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the artist property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setArtist(String value) {
|
||||
this.artist = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the track property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getTrack() {
|
||||
return track;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the track property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setTrack(Integer value) {
|
||||
this.track = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the year property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the year property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setYear(Integer value) {
|
||||
this.year = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the genre property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getGenre() {
|
||||
return genre;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the genre property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setGenre(String value) {
|
||||
this.genre = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the coverArtId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getCoverArtId() {
|
||||
return coverArtId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the coverArtId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setCoverArtId(String value) {
|
||||
this.coverArtId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the size property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public Long getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the size property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public void setSize(Long value) {
|
||||
this.size = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the contentType property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the contentType property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setContentType(String value) {
|
||||
this.contentType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the suffix property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getSuffix() {
|
||||
return suffix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the suffix property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setSuffix(String value) {
|
||||
this.suffix = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the transcodedContentType property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getTranscodedContentType() {
|
||||
return transcodedContentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the transcodedContentType property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setTranscodedContentType(String value) {
|
||||
this.transcodedContentType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the transcodedSuffix property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getTranscodedSuffix() {
|
||||
return transcodedSuffix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the transcodedSuffix property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setTranscodedSuffix(String value) {
|
||||
this.transcodedSuffix = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the duration property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the duration property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setDuration(Integer value) {
|
||||
this.duration = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the bitRate property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getBitRate() {
|
||||
return bitRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the bitRate property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setBitRate(Integer value) {
|
||||
this.bitRate = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the path property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the path property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setPath(String value) {
|
||||
this.path = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the video property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isVideo() {
|
||||
return video;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the video property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public void setVideo(Boolean value) {
|
||||
this.video = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the userRating property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getUserRating() {
|
||||
return userRating;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the userRating property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setUserRating(Integer value) {
|
||||
this.userRating = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the averageRating property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Double }
|
||||
*/
|
||||
public Double getAverageRating() {
|
||||
return averageRating;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the averageRating property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Double }
|
||||
*/
|
||||
public void setAverageRating(Double value) {
|
||||
this.averageRating = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the playCount property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public Long getPlayCount() {
|
||||
return playCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the playCount property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public void setPlayCount(Long value) {
|
||||
this.playCount = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the discNumber property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getDiscNumber() {
|
||||
return discNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the discNumber property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setDiscNumber(Integer value) {
|
||||
this.discNumber = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the created property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public LocalDateTime getCreated() {
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the created property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setCreated(LocalDateTime value) {
|
||||
public void setCreated(Date value) {
|
||||
this.created = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the starred property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public LocalDateTime getStarred() {
|
||||
public Date getStarred() {
|
||||
return starred;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the starred property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setStarred(LocalDateTime value) {
|
||||
public void setStarred(Date value) {
|
||||
this.starred = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the albumId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getAlbumId() {
|
||||
return albumId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the albumId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setAlbumId(String value) {
|
||||
this.albumId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the artistId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getArtistId() {
|
||||
return artistId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the artistId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setArtistId(String value) {
|
||||
this.artistId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the type property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link MediaType }
|
||||
*/
|
||||
public MediaType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the type property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link MediaType }
|
||||
*/
|
||||
public void setType(MediaType value) {
|
||||
this.type = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the bookmarkPosition property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public Long getBookmarkPosition() {
|
||||
return bookmarkPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the bookmarkPosition property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Long }
|
||||
*/
|
||||
public void setBookmarkPosition(Long value) {
|
||||
this.bookmarkPosition = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the originalWidth property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getOriginalWidth() {
|
||||
return originalWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the originalWidth property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setOriginalWidth(Integer value) {
|
||||
this.originalWidth = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the originalHeight property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public Integer getOriginalHeight() {
|
||||
return originalHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the originalHeight property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Integer }
|
||||
*/
|
||||
public void setOriginalHeight(Integer value) {
|
||||
this.originalHeight = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +1,38 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Attribute;
|
||||
import com.tickaroo.tikxml.annotation.TextContent;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
@Xml
|
||||
public class Genre {
|
||||
protected String name;
|
||||
@TextContent
|
||||
protected String genre;
|
||||
@Attribute
|
||||
protected int songCount;
|
||||
@Attribute
|
||||
protected int albumCount;
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
public String getGenre() {
|
||||
return genre;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
public void setGenre(String value) {
|
||||
this.genre = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the songCount property.
|
||||
*/
|
||||
public int getSongCount() {
|
||||
return songCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the songCount property.
|
||||
*/
|
||||
public void setSongCount(int value) {
|
||||
this.songCount = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the albumCount property.
|
||||
*/
|
||||
public int getAlbumCount() {
|
||||
return albumCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the albumCount property.
|
||||
*/
|
||||
public void setAlbumCount(int value) {
|
||||
this.albumCount = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +1,24 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class Genres {
|
||||
@Element
|
||||
protected List<Genre> genres;
|
||||
|
||||
/**
|
||||
* Gets the value of the genres property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the genres property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getGenres().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Genre }
|
||||
*/
|
||||
public List<Genre> getGenres() {
|
||||
if (genres == null) {
|
||||
genres = new ArrayList<Genre>();
|
||||
genres = new ArrayList<>();
|
||||
}
|
||||
return this.genres;
|
||||
}
|
||||
|
||||
public void setGenres(List<Genre> genres) {
|
||||
this.genres = genres;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,55 +1,32 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class IndexID3 {
|
||||
@Element(name = "artist")
|
||||
protected List<ArtistID3> artists;
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* Gets the value of the artists property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the artists property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getArtists().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link ArtistID3 }
|
||||
*/
|
||||
public List<ArtistID3> getArtists() {
|
||||
if (artists == null) {
|
||||
artists = new ArrayList<ArtistID3>();
|
||||
artists = new ArrayList<>();
|
||||
}
|
||||
return this.artists;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setArtists(List<ArtistID3> artists) {
|
||||
this.artists = artists;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,23 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
public enum MediaType {
|
||||
MUSIC("music"),
|
||||
PODCAST("podcast"),
|
||||
AUDIOBOOK("audiobook"),
|
||||
VIDEO("video");
|
||||
import com.tickaroo.tikxml.annotation.Attribute;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
private final String value;
|
||||
@Xml
|
||||
public class MediaType {
|
||||
public static String MUSIC = "music";
|
||||
public static String PODCAST = "podcast";
|
||||
public static String AUDIOBOOK = "audiobook";
|
||||
public static String VIDEO = "video";
|
||||
|
||||
MediaType(String v) {
|
||||
value = v;
|
||||
}
|
||||
@Attribute
|
||||
private String value;
|
||||
|
||||
public String value() {
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static MediaType fromValue(String v) {
|
||||
for (MediaType c : MediaType.values()) {
|
||||
if (c.value.equals(v)) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException(v);
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +1,27 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
public class MusicFolder {
|
||||
protected int id;
|
||||
protected String name;
|
||||
import com.tickaroo.tikxml.annotation.Attribute;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*/
|
||||
@Xml
|
||||
public class MusicFolder {
|
||||
@Attribute
|
||||
protected int id;
|
||||
@Attribute
|
||||
protected String name;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*/
|
||||
public void setId(int value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,24 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class MusicFolders {
|
||||
@Element
|
||||
protected List<MusicFolder> musicFolders;
|
||||
|
||||
/**
|
||||
* Gets the value of the musicFolders property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the musicFolders property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getMusicFolders().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link MusicFolder }
|
||||
*/
|
||||
public List<MusicFolder> getMusicFolders() {
|
||||
if (musicFolders == null) {
|
||||
musicFolders = new ArrayList<MusicFolder>();
|
||||
musicFolders = new ArrayList<>();
|
||||
}
|
||||
return this.musicFolders;
|
||||
}
|
||||
|
||||
public void setMusicFolders(List<MusicFolder> musicFolders) {
|
||||
this.musicFolders = musicFolders;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,233 +1,126 @@
|
|||
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;
|
||||
|
||||
@Xml
|
||||
public class Playlist {
|
||||
protected List<String> allowedUsers;
|
||||
@Attribute
|
||||
protected String id;
|
||||
@Attribute
|
||||
protected String name;
|
||||
@Attribute
|
||||
protected String comment;
|
||||
@Attribute
|
||||
protected String owner;
|
||||
protected Boolean _public;
|
||||
@Attribute(name = "public")
|
||||
protected Boolean universal;
|
||||
@Attribute
|
||||
protected int songCount;
|
||||
@Attribute
|
||||
protected int duration;
|
||||
protected LocalDateTime created;
|
||||
protected LocalDateTime changed;
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date created;
|
||||
@Attribute(converter = DateRfc3339TypeConverter.class)
|
||||
protected Date changed;
|
||||
@Attribute
|
||||
protected String coverArtId;
|
||||
|
||||
/**
|
||||
* Gets the value of the allowedUsers property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the allowedUsers property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAllowedUsers().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public List<String> getAllowedUsers() {
|
||||
if (allowedUsers == null) {
|
||||
allowedUsers = new ArrayList<String>();
|
||||
allowedUsers = new ArrayList<>();
|
||||
}
|
||||
return this.allowedUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setAllowedUsers(List<String> allowedUsers) {
|
||||
this.allowedUsers = allowedUsers;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the comment property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the comment property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setComment(String value) {
|
||||
this.comment = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the owner property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the owner property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
|
||||
public void setOwner(String value) {
|
||||
this.owner = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the public property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isPublic() {
|
||||
return _public;
|
||||
public Boolean isUniversal() {
|
||||
return universal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the public property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public void setPublic(Boolean value) {
|
||||
this._public = value;
|
||||
public void setUniversal(Boolean value) {
|
||||
this.universal = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the songCount property.
|
||||
*/
|
||||
public int getSongCount() {
|
||||
return songCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the songCount property.
|
||||
*/
|
||||
|
||||
public void setSongCount(int value) {
|
||||
this.songCount = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the duration property.
|
||||
*/
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the duration property.
|
||||
*/
|
||||
|
||||
public void setDuration(int value) {
|
||||
this.duration = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the created property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public LocalDateTime getCreated() {
|
||||
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the created property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setCreated(LocalDateTime value) {
|
||||
public void setCreated(Date value) {
|
||||
this.created = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the changed property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public LocalDateTime getChanged() {
|
||||
|
||||
public Date getChanged() {
|
||||
return changed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the changed property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setChanged(LocalDateTime value) {
|
||||
public void setChanged(Date value) {
|
||||
this.changed = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the coverArtId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getCoverArtId() {
|
||||
return coverArtId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the coverArtId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setCoverArtId(String value) {
|
||||
this.coverArtId = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +1,24 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class PlaylistWithSongs extends Playlist {
|
||||
@Element(name = "entry")
|
||||
protected List<Child> entries;
|
||||
|
||||
/**
|
||||
* Gets the value of the entries property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the entries property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getEntries().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Child }
|
||||
*/
|
||||
public List<Child> getEntries() {
|
||||
if (entries == null) {
|
||||
entries = new ArrayList<Child>();
|
||||
entries = new ArrayList<>();
|
||||
}
|
||||
return this.entries;
|
||||
}
|
||||
|
||||
public void setEntries(List<Child> entries) {
|
||||
this.entries = entries;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +1,24 @@
|
|||
package com.cappielloantonio.play.subsonic.models;
|
||||
|
||||
import com.tickaroo.tikxml.annotation.Element;
|
||||
import com.tickaroo.tikxml.annotation.Xml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Xml
|
||||
public class Playlists {
|
||||
@Element
|
||||
protected List<Playlist> playlists;
|
||||
|
||||
/**
|
||||
* Gets the value of the playlists property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the playlists property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getPlaylists().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Playlist }
|
||||
*/
|
||||
public List<Playlist> getPlaylists() {
|
||||
if (playlists == null) {
|
||||
playlists = new ArrayList<Playlist>();
|
||||
playlists = new ArrayList<>();
|
||||
}
|
||||
return this.playlists;
|
||||
}
|
||||
|
||||
public void setPlaylists(List<Playlist> playlists) {
|
||||
this.playlists = playlists;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public class SubsonicResponse {
|
|||
private Lyrics lyrics;
|
||||
private Songs songsByGenre;
|
||||
private Songs randomSongs;
|
||||
@Element
|
||||
private AlbumList2 albumList2;
|
||||
private AlbumList albumList;
|
||||
private ChatMessages chatMessages;
|
||||
|
|
@ -35,7 +36,9 @@ public class SubsonicResponse {
|
|||
private License license;
|
||||
private JukeboxPlaylist jukeboxPlaylist;
|
||||
private JukeboxStatus jukeboxStatus;
|
||||
@Element
|
||||
private PlaylistWithSongs playlist;
|
||||
@Element
|
||||
private Playlists playlists;
|
||||
private SearchResult3 searchResult3;
|
||||
private SearchResult2 searchResult2;
|
||||
|
|
@ -44,12 +47,16 @@ public class SubsonicResponse {
|
|||
private VideoInfo videoInfo;
|
||||
private Videos videos;
|
||||
private Child song;
|
||||
@Element(name = "album")
|
||||
private AlbumWithSongsID3 album;
|
||||
private ArtistWithAlbumsID3 artist;
|
||||
@Element(name = "artists")
|
||||
private ArtistsID3 artists;
|
||||
@Element
|
||||
private Genres genres;
|
||||
private Directory directory;
|
||||
private Indexes indexes;
|
||||
@Element
|
||||
private MusicFolders musicFolders;
|
||||
@Attribute(converter = ResponseStatusConverter.class)
|
||||
private ResponseStatus status;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue