From 0f21c48e66fd1c63ee3e22512975eea338c3a8fd Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Mon, 14 Mar 2016 03:49:33 -0500 Subject: [PATCH] MediaFile: add track number to toString (if available). --- .../java/com/jdbernard/wdiwtlt/db/models/MediaFile.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/jdbernard/wdiwtlt/db/models/MediaFile.java b/core/src/main/java/com/jdbernard/wdiwtlt/db/models/MediaFile.java index b0b33d9..4b668f0 100644 --- a/core/src/main/java/com/jdbernard/wdiwtlt/db/models/MediaFile.java +++ b/core/src/main/java/com/jdbernard/wdiwtlt/db/models/MediaFile.java @@ -15,8 +15,10 @@ public class MediaFile extends Model { public String fileHash; public String metaInfoSource = TAG_INFO; public Timestamp dateAdded = new Timestamp(new Date().getTime()); - public Timestamp lastPlayed; + public Timestamp lastPlayed; public String comment; - public String toString() { return name; } + public String toString() { + if (trackNumber != null) return trackNumber + " - " + name; + else return name; } }