Added starred tracks, starred albums and starred artists view

This commit is contained in:
CappielloAntonio 2021-07-27 16:58:38 +02:00
parent 9495fbd83d
commit 7742cbdd08
23 changed files with 752 additions and 171 deletions

View file

@ -1,91 +1,50 @@
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 Starred2 {
@Element(name = "artist")
protected List<ArtistID3> artists;
@Element(name = "album")
protected List<AlbumID3> albums;
@Element(name = "song")
protected List<Child> songs;
/**
* 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 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 void setArtists(List<ArtistID3> artists) {
this.artists = artists;
}
public List<AlbumID3> getAlbums() {
if (albums == null) {
albums = new ArrayList<AlbumID3>();
albums = new ArrayList<>();
}
return this.albums;
}
/**
* 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 void setAlbums(List<AlbumID3> albums) {
this.albums = albums;
}
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;
}
}

View file

@ -17,6 +17,7 @@ public class SubsonicResponse {
private ArtistInfo2 artistInfo2;
private ArtistInfo artistInfo;
private AlbumInfo albumInfo;
@Element(name = "starred2")
private Starred2 starred2;
private Starred starred;
private Shares shares;