Skip to content

Commit 59e5018

Browse files
author
Yevhen Babiichuk (DustDFG)
committed
player/helper/PlayerHelper#getTimeString replace ints with longs
Duration data in the player code incosnistently typed. Half code uses ints and half uses longs. Recieve longs in this function to allow both halfs of player code just use the function without nasty long to int downcasting warnings/errors in code
1 parent 13186c0 commit 59e5018

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ public static void resetFormat() {
8787
}
8888

8989
@NonNull
90-
public static String getTimeString(final int milliSeconds) {
91-
final int seconds = (milliSeconds % 60000) / 1000;
92-
final int minutes = (milliSeconds % 3600000) / 60000;
93-
final int hours = (milliSeconds % 86400000) / 3600000;
94-
final int days = (milliSeconds % (86400000 * 7)) / 86400000;
90+
public static String getTimeString(final long milliSeconds) {
91+
final long seconds = (milliSeconds % 60000) / 1000;
92+
final long minutes = (milliSeconds % 3600000) / 60000;
93+
final long hours = (milliSeconds % 86400000) / 3600000;
94+
final long days = (milliSeconds % (86400000 * 7)) / 86400000;
9595

9696
final Formatters formatters = FORMATTERS_PROVIDER.formatters();
9797
if (days > 0) {

0 commit comments

Comments
 (0)