aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-09-17 16:56:37 -0700
committerScott Jackson <daneren2005@gmail.com>2015-09-17 16:56:37 -0700
commitd763831ecf000f0dc3667171d8448e2780718794 (patch)
tree118313174b156540dd8225b45095be9adf7fb880 /app/src
parenta0a5b982166a5e368bf7d4cc00bb329558298a7a (diff)
downloaddsub-d763831ecf000f0dc3667171d8448e2780718794.tar.gz
dsub-d763831ecf000f0dc3667171d8448e2780718794.tar.bz2
dsub-d763831ecf000f0dc3667171d8448e2780718794.zip
Display local cached version of duration in details dialog
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java7
1 files changed, 5 insertions, 2 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 6c5b63d1..fc619001 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -1241,6 +1241,9 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
Log.i(TAG, "Device doesn't properly support MediaMetadataRetreiver");
}
}
+ if(duration == null) {
+ duration = song.getDuration();
+ }
List<Integer> headers = new ArrayList<>();
List<String> details = new ArrayList<>();
@@ -1299,9 +1302,9 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
headers.add(R.string.details_size);
details.add(Util.formatLocalizedBytes(size, context));
}
- if(song.getDuration() != null && song.getDuration() != 0) {
+ if(duration != null && duration != 0) {
headers.add(R.string.details_length);
- details.add(Util.formatDuration(song.getDuration()));
+ details.add(Util.formatDuration(duration));
}
if(song.getBookmark() != null) {
headers.add(R.string.details_bookmark_position);