From ec16db138219bc8d5cb56ebc4ba8361d85eeb392 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 4 Feb 2013 19:27:58 -0800 Subject: Add track # to song details --- .../src/github/daneren2005/dsub/activity/SubsonicTabActivity.java | 3 +++ .../src/github/daneren2005/dsub/service/OfflineMusicService.java | 1 + 2 files changed, 4 insertions(+) (limited to 'subsonic-android/src/github') diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java index d2c61b59..398b0e65 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java @@ -508,6 +508,9 @@ public class SubsonicTabActivity extends SherlockActivity { if(!song.isVideo()) { msg += "Artist: " + song.getArtist() + "\nAlbum: " + song.getAlbum(); } + if(song.getTrack() != null && song.getTrack() != 0) { + msg += "\nTrack: " + song.getTrack(); + } if(song.getGenre() != null && !"".equals(song.getGenre())) { msg += "\nGenre: " + song.getGenre(); } diff --git a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java index 1ac8e9cc..89492687 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java @@ -167,6 +167,7 @@ public class OfflineMusicService extends RESTMusicService { Log.i(TAG, "Device doesn't properly support MediaMetadataRetreiver"); } + entry.setTrack(Integer.parseInt(name.substring(0, name.indexOf('-')))); title = title.substring(title.indexOf('-') + 1); } -- cgit v1.2.3