aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/fragments/DownloadFragment.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java
index bd5669f0..f6aa15fe 100644
--- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java
+++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java
@@ -980,7 +980,11 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe
int millisTotal = duration == null ? 0 : duration;
positionTextView.setText(Util.formatDuration(millisPlayed / 1000));
- durationTextView.setText(Util.formatDuration(millisTotal / 1000));
+ if(millisTotal > 0) {
+ durationTextView.setText(Util.formatDuration(millisTotal / 1000));
+ } else {
+ durationTextView.setText("-:--");
+ }
progressBar.setMax(millisTotal == 0 ? 100 : millisTotal); // Work-around for apparent bug.
if(!seekInProgress) {
progressBar.setProgress(millisPlayed);