mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Fixed bottom sheets functionality
This commit is contained in:
parent
320e3b8678
commit
2e1c21e73c
15 changed files with 348 additions and 222 deletions
|
|
@ -10,6 +10,10 @@ import androidx.room.Ignore;
|
|||
import androidx.room.PrimaryKey;
|
||||
|
||||
import com.cappielloantonio.play.subsonic.models.AlbumID3;
|
||||
import com.cappielloantonio.play.subsonic.models.AlbumWithSongsID3;
|
||||
import com.cappielloantonio.play.util.MappingUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Album implements Parcelable {
|
||||
private static final String TAG = "Album";
|
||||
|
|
@ -27,6 +31,7 @@ public class Album implements Parcelable {
|
|||
public String primary;
|
||||
public String blurHash;
|
||||
public boolean favorite;
|
||||
public List<Song> songs;
|
||||
|
||||
public Album(AlbumID3 albumID3) {
|
||||
this.id = albumID3.getId();
|
||||
|
|
@ -37,6 +42,18 @@ public class Album implements Parcelable {
|
|||
this.primary = albumID3.getCoverArtId();
|
||||
this.favorite = albumID3.getStarred() != null;
|
||||
}
|
||||
|
||||
public Album(AlbumWithSongsID3 albumWithSongsID3) {
|
||||
this.id = albumWithSongsID3.getId();
|
||||
this.title = albumWithSongsID3.getName();
|
||||
this.year = albumWithSongsID3.getYear();
|
||||
this.artistId = albumWithSongsID3.getArtistId();
|
||||
this.artistName = albumWithSongsID3.getArtist();
|
||||
this.primary = albumWithSongsID3.getCoverArtId();
|
||||
this.favorite = albumWithSongsID3.getStarred() != null;
|
||||
this.songs = MappingUtil.mapSong(albumWithSongsID3.getSongs());
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -101,6 +118,14 @@ public class Album implements Parcelable {
|
|||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
public List<Song> getSongs() {
|
||||
return songs;
|
||||
}
|
||||
|
||||
public void setSongs(List<Song> songs) {
|
||||
this.songs = songs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,8 @@ package com.cappielloantonio.play.model;
|
|||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.Html;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.Ignore;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import com.cappielloantonio.play.subsonic.models.ArtistID3;
|
||||
import com.cappielloantonio.play.subsonic.models.ArtistInfo2;
|
||||
|
|
@ -55,6 +50,7 @@ public class Artist implements Parcelable {
|
|||
this.albumCount = artistWithAlbumsID3.getAlbumCount();
|
||||
this.albums = MappingUtil.mapAlbum(artistWithAlbumsID3.getAlbums());
|
||||
this.favorite = artistWithAlbumsID3.getStarred() != null;
|
||||
this.albums = MappingUtil.mapAlbum(artistWithAlbumsID3.getAlbums());
|
||||
}
|
||||
|
||||
public Artist(ArtistInfo2 artistInfo2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue