[Android] Fix TV item progress text when media is played or not started

Nicolas Pomepuy git at videolan.org
Wed Feb 10 13:37:56 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Feb 10 13:55:55 2021 +0100| [960e41bde317ad47a0680b604f1d68311064de45] | committer: Nicolas Pomepuy

Fix TV item progress text when media is played or not started

> https://code.videolan.org/videolan/vlc-android/commit/960e41bde317ad47a0680b604f1d68311064de45
---

 medialibrary/src/org/videolan/medialibrary/Tools.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/Tools.java b/medialibrary/src/org/videolan/medialibrary/Tools.java
index 77ce5d731..720c68c9e 100644
--- a/medialibrary/src/org/videolan/medialibrary/Tools.java
+++ b/medialibrary/src/org/videolan/medialibrary/Tools.java
@@ -43,7 +43,7 @@ public class Tools {
     }
     public static String getProgressText(MediaWrapper media) {
         long lastTime = media.getTime();
-        if (lastTime == 0L) return "";
+        if (lastTime <= 0L) return "";
         return String.format("%s / %s",
                 millisToString(lastTime, true, false, false),
                 millisToString(media.getLength(), true, false, false));



More information about the Android mailing list