mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Implemented star for tracks, albums and artists
This commit is contained in:
parent
6f1046b137
commit
f09d3b774d
14 changed files with 273 additions and 17 deletions
|
|
@ -21,6 +21,7 @@ public class Album implements Parcelable {
|
|||
public String artistName;
|
||||
public String primary;
|
||||
public String blurHash;
|
||||
public boolean favorite;
|
||||
|
||||
public Album(AlbumID3 albumID3) {
|
||||
this.id = albumID3.getId();
|
||||
|
|
@ -29,6 +30,7 @@ public class Album implements Parcelable {
|
|||
this.artistId = albumID3.getArtistId();
|
||||
this.artistName = albumID3.getArtist();
|
||||
this.primary = albumID3.getCoverArtId();
|
||||
this.favorite = albumID3.getStarred() != null;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
|
|
@ -86,6 +88,14 @@ public class Album implements Parcelable {
|
|||
this.blurHash = blurHash;
|
||||
}
|
||||
|
||||
public boolean isFavorite() {
|
||||
return favorite;
|
||||
}
|
||||
|
||||
public void setFavorite(boolean favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ public class Artist implements Parcelable {
|
|||
public String backdrop;
|
||||
public String backdropBlurHash;
|
||||
public int albumCount;
|
||||
public boolean favorite;
|
||||
|
||||
public Artist(ArtistID3 artistID3) {
|
||||
this.id = artistID3.getId();
|
||||
|
|
@ -38,6 +39,7 @@ public class Artist implements Parcelable {
|
|||
this.primary = artistID3.getCoverArtId();
|
||||
this.backdrop = artistID3.getCoverArtId();
|
||||
this.albumCount = artistID3.getAlbumCount();
|
||||
this.favorite = artistID3.getStarred() != null;
|
||||
}
|
||||
|
||||
public Artist(ArtistWithAlbumsID3 artistWithAlbumsID3) {
|
||||
|
|
@ -47,6 +49,7 @@ public class Artist implements Parcelable {
|
|||
this.backdrop = artistWithAlbumsID3.getCoverArtId();
|
||||
this.albumCount = artistWithAlbumsID3.getAlbumCount();
|
||||
this.albums = MappingUtil.mapAlbum(artistWithAlbumsID3.getAlbums());
|
||||
this.favorite = artistWithAlbumsID3.getStarred() != null;
|
||||
}
|
||||
|
||||
public Artist(String id, String name) {
|
||||
|
|
@ -118,6 +121,14 @@ public class Artist implements Parcelable {
|
|||
this.albums = albums;
|
||||
}
|
||||
|
||||
public boolean isFavorite() {
|
||||
return favorite;
|
||||
}
|
||||
|
||||
public void setFavorite(boolean favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue