Added lastPlayed field on MediaFile.

This commit is contained in:
Jonathan Bernard 2016-02-17 07:03:30 -06:00
parent a4013ed365
commit 47590a8c8f
2 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,8 @@ public class MediaFile extends Model {
public String filePath; public String filePath;
public String fileHash; public String fileHash;
public String metaInfoSource = TAG_INFO; public String metaInfoSource = TAG_INFO;
public Date dateAdded = new Timestamp(new Date().getTime()); public Timestamp dateAdded = new Timestamp(new Date().getTime());
public Timestamp lastPlayed;
public String comment; public String comment;
public String toString() { return name; } public String toString() { return name; }

View File

@ -23,6 +23,7 @@ CREATE TABLE media_files (
file_hash VARCHAR NOT NULL, file_hash VARCHAR NOT NULL,
meta_info_source VARCHAR NOT NULL, -- 'tag' or 'filesystem' meta_info_source VARCHAR NOT NULL, -- 'tag' or 'filesystem'
date_added TIMESTAMP NOT NULL DEFAULT NOW(), date_added TIMESTAMP NOT NULL DEFAULT NOW(),
last_played TIMESTAMP,
comment VARCHAR DEFAULT '' comment VARCHAR DEFAULT ''
); );