Enabled all caches and added custom signatures
This commit is contained in:
parent
46ccf7ab76
commit
744d5e12a6
17 changed files with 69 additions and 40 deletions
|
|
@ -6,27 +6,31 @@ package com.kabouzeid.gramophone.model;
|
|||
public class Album {
|
||||
|
||||
public final int id;
|
||||
public int artistId;
|
||||
public final int artistId;
|
||||
public final String title;
|
||||
public final String artistName;
|
||||
public final int songCount;
|
||||
public final int year;
|
||||
public final String albumArtPath; //used as cache key
|
||||
|
||||
public Album(final int id, final String title, final String artistName, final int artistId,
|
||||
final int songNumber, final int albumYear) {
|
||||
final int songNumber, final int albumYear, final String albumArtPath) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.artistName = artistName;
|
||||
this.artistId = artistId;
|
||||
songCount = songNumber;
|
||||
year = albumYear;
|
||||
this.albumArtPath = albumArtPath != null ? albumArtPath : "";
|
||||
}
|
||||
|
||||
public Album() {
|
||||
this.id = -1;
|
||||
this.title = "";
|
||||
this.artistName = "";
|
||||
this.artistId = -1;
|
||||
songCount = -1;
|
||||
year = -1;
|
||||
this.albumArtPath = "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ package com.kabouzeid.gramophone.model;
|
|||
|
||||
public class PlaylistSong extends Song {
|
||||
public final int playlistId;
|
||||
public int idInPlayList;
|
||||
public final int idInPlayList;
|
||||
|
||||
public PlaylistSong(final int id, final int albumId, final int artistId, final String title, final String artistName,
|
||||
final String albumName, final long duration, final int trackNumber, final int playlistId, final int idInPlayList) {
|
||||
super(id, albumId, artistId, title, artistName, albumName, duration, trackNumber);
|
||||
final String albumName, final long duration, final int trackNumber, final int playlistId, final int idInPlayList, final long dateModified) {
|
||||
super(id, albumId, artistId, title, artistName, albumName, duration, trackNumber, dateModified);
|
||||
this.playlistId = playlistId;
|
||||
this.idInPlayList = idInPlayList;
|
||||
}
|
||||
|
|
@ -14,6 +14,6 @@ public class PlaylistSong extends Song {
|
|||
public PlaylistSong() {
|
||||
super();
|
||||
playlistId = -1;
|
||||
id = -1;
|
||||
idInPlayList = -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import java.io.Serializable;
|
|||
*/
|
||||
public class Song implements Serializable {
|
||||
|
||||
public int id;
|
||||
public final int id;
|
||||
public final int albumId;
|
||||
public final int artistId;
|
||||
public final String title;
|
||||
|
|
@ -15,9 +15,10 @@ public class Song implements Serializable {
|
|||
public final String albumName;
|
||||
public final long duration;
|
||||
public final int trackNumber;
|
||||
public final long dateModified; //used as cache key
|
||||
|
||||
public Song(final int id, final int albumId, final int artistId, final String title, final String artistName,
|
||||
final String albumName, final long duration, final int trackNumber) {
|
||||
final String albumName, final long duration, final int trackNumber, final long dateModified) {
|
||||
this.id = id;
|
||||
this.albumId = albumId;
|
||||
this.artistId = artistId;
|
||||
|
|
@ -26,6 +27,7 @@ public class Song implements Serializable {
|
|||
this.albumName = albumName;
|
||||
this.duration = duration;
|
||||
this.trackNumber = trackNumber;
|
||||
this.dateModified = dateModified;
|
||||
}
|
||||
|
||||
public Song() {
|
||||
|
|
@ -37,5 +39,6 @@ public class Song implements Serializable {
|
|||
this.albumName = "";
|
||||
this.duration = -1;
|
||||
this.trackNumber = -1;
|
||||
this.dateModified = -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue