Accommodate time formatting for different countries

If there's a . in the time format, this detects it and uses is instead of : 
This removes errors and lag related to "Could not get duration" while using NewPipe in countries with official time formatting with . (dot) instead of : (punctuation colon)

Tested to compile and work on real device
pull/112/head
skil3z 2018-09-09 12:53:10 +03:00 zatwierdzone przez GitHub
rodzic 66c3c3f452
commit a83d020944
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -30,7 +30,17 @@ public class YoutubeParsingHelper {
public static long parseDurationString(String input)
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 hours = "0";
String minutes = "0";