mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-08-31 22:35:50 +00:00
Merge pull request #112 from skil3z/master
Fix time formatting for different countries
This commit is contained in:
@@ -30,7 +30,17 @@ public class YoutubeParsingHelper {
|
|||||||
|
|
||||||
public static long parseDurationString(String input)
|
public static long parseDurationString(String input)
|
||||||
throws ParsingException, NumberFormatException {
|
throws ParsingException, NumberFormatException {
|
||||||
String[] splitInput = input.split(":");
|
|
||||||
|
String[] splitInput;
|
||||||
|
|
||||||
|
// If time separator : is not detected, try . instead
|
||||||
|
|
||||||
|
if (input.contains(":")) {
|
||||||
|
splitInput = input.split(":");
|
||||||
|
} else {
|
||||||
|
splitInput = input.split("\\.");
|
||||||
|
}
|
||||||
|
|
||||||
String days = "0";
|
String days = "0";
|
||||||
String hours = "0";
|
String hours = "0";
|
||||||
String minutes = "0";
|
String minutes = "0";
|
||||||
|
Reference in New Issue
Block a user