diff options
Diffstat (limited to 'app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java index 6d25bc0b..d824a236 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -77,6 +77,7 @@ import github.daneren2005.dsub.util.MenuUtil; import github.daneren2005.dsub.util.ProgressListener; import github.daneren2005.dsub.util.SilentBackgroundTask; import github.daneren2005.dsub.util.LoadingTask; +import github.daneren2005.dsub.util.SongDBHandler; import github.daneren2005.dsub.util.UpdateHelper; import github.daneren2005.dsub.util.UserUtil; import github.daneren2005.dsub.util.Util; @@ -1293,6 +1294,16 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR headers.add(R.string.details_starred); details.add(Util.formatBoolean(context, song.isStarred())); + try { + Long[] dates = SongDBHandler.getHandler(context).getLastPlayed(song.getId()); + if(dates != null) { + headers.add(R.string.details_last_played); + details.add(Util.formatDate(dates[0])); + } + } catch(Exception e) { + Log.e(TAG, "Failed to get last played", e); + } + if(song instanceof PodcastEpisode) { headers.add(R.string.details_description); details.add(song.getAlbum()); |