mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Saving play history. The tracks are saved in the db at the time of playback and every week a list of the most played tracks is generated in the home page in grid format
This commit is contained in:
parent
6a1c5d2ce3
commit
ff8bf4f6bf
14 changed files with 646 additions and 55 deletions
|
|
@ -85,6 +85,7 @@ public class Media implements Parcelable {
|
|||
this.playCount = 0;
|
||||
this.lastPlay = 0;
|
||||
this.rating = child.getUserRating() != null ? child.getUserRating() : 0;
|
||||
// this.type = MEDIA_TYPE_MUSIC;
|
||||
this.type = child.getType();
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +107,7 @@ public class Media implements Parcelable {
|
|||
this.container = podcastEpisode.getContentType();
|
||||
this.bitrate = podcastEpisode.getBitRate();
|
||||
this.extension = podcastEpisode.getSuffix();
|
||||
// this.type = MEDIA_TYPE_PODCAST;
|
||||
this.type = podcastEpisode.getType();
|
||||
}
|
||||
|
||||
|
|
@ -143,6 +145,21 @@ public class Media implements Parcelable {
|
|||
this.type = download.getType();
|
||||
}
|
||||
|
||||
public Media(Chronology item) {
|
||||
this.id = item.getTrackId();
|
||||
this.title = item.getTitle();
|
||||
this.albumId = item.getAlbumId();
|
||||
this.albumName = item.getAlbumName();
|
||||
this.artistId = item.getArtistId();
|
||||
this.artistName = item.getArtistName();
|
||||
this.coverArtId = item.getCoverArtId();
|
||||
this.duration = item.getDuration();
|
||||
this.container = item.getContainer();
|
||||
this.bitrate = item.getBitrate();
|
||||
this.extension = item.getExtension();
|
||||
this.type = MEDIA_TYPE_MUSIC;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue