pass blurhash in parcel and fix sidebar image
This commit is contained in:
parent
d7b1221199
commit
7f0bbaab4e
9 changed files with 29 additions and 8 deletions
|
|
@ -3,6 +3,8 @@ package com.dkanada.gramophone.model;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.jellyfin.apiclient.model.dto.BaseItemDto;
|
||||
import org.jellyfin.apiclient.model.entities.ImageType;
|
||||
|
||||
|
|
@ -52,6 +54,7 @@ public class Album implements Parcelable {
|
|||
this.artistName = song.artistName;
|
||||
|
||||
this.primary = song.primary;
|
||||
this.blurHash = song.blurHash;
|
||||
}
|
||||
|
||||
public Album() {
|
||||
|
|
@ -72,6 +75,7 @@ public class Album implements Parcelable {
|
|||
return id.hashCode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
|
|
@ -92,6 +96,7 @@ public class Album implements Parcelable {
|
|||
dest.writeString(artistName);
|
||||
|
||||
dest.writeString(primary);
|
||||
dest.writeString(blurHash);
|
||||
}
|
||||
|
||||
protected Album(Parcel in) {
|
||||
|
|
@ -105,6 +110,7 @@ public class Album implements Parcelable {
|
|||
this.artistName = in.readString();
|
||||
|
||||
this.primary = in.readString();
|
||||
this.blurHash = in.readString();
|
||||
}
|
||||
|
||||
public static final Creator<Album> CREATOR = new Creator<Album>() {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.dkanada.gramophone.model;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.jellyfin.apiclient.model.dto.BaseItemDto;
|
||||
import org.jellyfin.apiclient.model.dto.GenreDto;
|
||||
import org.jellyfin.apiclient.model.entities.ImageType;
|
||||
|
|
@ -70,6 +72,7 @@ public class Artist implements Parcelable {
|
|||
return id.hashCode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
|
|
@ -86,6 +89,7 @@ public class Artist implements Parcelable {
|
|||
dest.writeString(name);
|
||||
|
||||
dest.writeString(primary);
|
||||
dest.writeString(blurHash);
|
||||
}
|
||||
|
||||
protected Artist(Parcel in) {
|
||||
|
|
@ -97,6 +101,7 @@ public class Artist implements Parcelable {
|
|||
this.name = in.readString();
|
||||
|
||||
this.primary = in.readString();
|
||||
this.blurHash = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<Artist> CREATOR = new Parcelable.Creator<Artist>() {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.dkanada.gramophone.model;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.jellyfin.apiclient.model.dto.BaseItemDto;
|
||||
import org.jellyfin.apiclient.model.dto.GenreDto;
|
||||
|
||||
|
|
@ -37,6 +39,7 @@ public class Genre implements Parcelable {
|
|||
return id.hashCode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.dkanada.gramophone.model;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.jellyfin.apiclient.model.dto.BaseItemDto;
|
||||
|
||||
public class Playlist implements Parcelable {
|
||||
|
|
@ -38,6 +40,7 @@ public class Playlist implements Parcelable {
|
|||
return id.hashCode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.dkanada.gramophone.model;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.jellyfin.apiclient.model.dto.BaseItemDto;
|
||||
import org.jellyfin.apiclient.model.dto.MediaSourceInfo;
|
||||
import org.jellyfin.apiclient.model.entities.ImageType;
|
||||
|
|
@ -117,6 +119,7 @@ public class Song implements Parcelable {
|
|||
return id.hashCode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
|
|
@ -144,6 +147,7 @@ public class Song implements Parcelable {
|
|||
|
||||
dest.writeString(this.primary);
|
||||
dest.writeString(Boolean.toString(favorite));
|
||||
dest.writeString(this.blurHash);
|
||||
|
||||
dest.writeString(this.path);
|
||||
dest.writeLong(this.size);
|
||||
|
|
@ -173,6 +177,7 @@ public class Song implements Parcelable {
|
|||
|
||||
this.primary = in.readString();
|
||||
this.favorite = Boolean.parseBoolean(in.readString());
|
||||
this.blurHash = in.readString();
|
||||
|
||||
this.path = in.readString();
|
||||
this.size = in.readLong();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue