mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 02:13:33 +00:00
Fixed a lot of possible issues raised by a code inspection
This commit is contained in:
parent
39ff821aee
commit
042bf3077f
76 changed files with 148 additions and 225 deletions
|
|
@ -20,9 +20,7 @@ public class Artist implements Parcelable {
|
|||
public static final String DOWNLOADED = "DOWNLOADED";
|
||||
public static final String STARRED = "STARRED";
|
||||
|
||||
private List<Genre> genres;
|
||||
private List<Album> albums;
|
||||
private List<Song> songs;
|
||||
private List<Artist> similarArtists;
|
||||
|
||||
private String id;
|
||||
|
|
@ -222,9 +220,7 @@ public class Artist implements Parcelable {
|
|||
}
|
||||
|
||||
protected Artist(Parcel in) {
|
||||
this.genres = new ArrayList<>();
|
||||
this.albums = new ArrayList<>();
|
||||
this.songs = new ArrayList<>();
|
||||
this.id = in.readString();
|
||||
this.name = in.readString();
|
||||
this.primary = in.readString();
|
||||
|
|
|
|||
|
|
@ -22,14 +22,34 @@ public class Genre implements Parcelable {
|
|||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getSongCount() {
|
||||
return songCount;
|
||||
}
|
||||
|
||||
public void setSongCount(int songCount) {
|
||||
this.songCount = songCount;
|
||||
}
|
||||
|
||||
public int getAlbumCount() {
|
||||
return albumCount;
|
||||
}
|
||||
|
||||
public void setAlbumCount(int albumCount) {
|
||||
this.albumCount = albumCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
package com.cappielloantonio.play.model;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
@Entity(tableName = "queue")
|
||||
public class Queue {
|
||||
@NonNull
|
||||
@PrimaryKey
|
||||
@ColumnInfo(name = "track_order")
|
||||
private int trackOrder;
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ public class Server implements Parcelable {
|
|||
return serverId.hashCode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return serverId;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.cappielloantonio.play.model;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.cappielloantonio.play.subsonic.models.Child;
|
||||
|
||||
import java.time.Instant;
|
||||
|
|
@ -296,6 +298,7 @@ public class Song implements Parcelable {
|
|||
return id.hashCode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue