From 59e5018c2d9b58de333f7bdab5c3f66f4c14f4dd Mon Sep 17 00:00:00 2001 From: "Yevhen Babiichuk (DustDFG)" Date: Wed, 28 Jan 2026 20:25:47 +0200 Subject: [PATCH] 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 --- .../org/schabi/newpipe/player/helper/PlayerHelper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index 0f9579352..11d39a5c5 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -87,11 +87,11 @@ public final class PlayerHelper { } @NonNull - public static String getTimeString(final int milliSeconds) { - final int seconds = (milliSeconds % 60000) / 1000; - final int minutes = (milliSeconds % 3600000) / 60000; - final int hours = (milliSeconds % 86400000) / 3600000; - final int days = (milliSeconds % (86400000 * 7)) / 86400000; + public static String getTimeString(final long milliSeconds) { + final long seconds = (milliSeconds % 60000) / 1000; + final long minutes = (milliSeconds % 3600000) / 60000; + final long hours = (milliSeconds % 86400000) / 3600000; + final long days = (milliSeconds % (86400000 * 7)) / 86400000; final Formatters formatters = FORMATTERS_PROVIDER.formatters(); if (days > 0) {