commit
dbf6ab9e91
|
@ -108,7 +108,12 @@ public class YoutubeParsingHelper {
|
||||||
return host.equalsIgnoreCase("invidio.us") || host.equalsIgnoreCase("dev.invidio.us") || host.equalsIgnoreCase("www.invidio.us") || host.equalsIgnoreCase("invidious.snopyta.org") || host.equalsIgnoreCase("de.invidious.snopyta.org") || host.equalsIgnoreCase("fi.invidious.snopyta.org") || host.equalsIgnoreCase("vid.wxzm.sx") || host.equalsIgnoreCase("invidious.kabi.tk") || host.equalsIgnoreCase("invidiou.sh") || host.equalsIgnoreCase("www.invidiou.sh") || host.equalsIgnoreCase("no.invidiou.sh") || host.equalsIgnoreCase("invidious.enkirton.net") || host.equalsIgnoreCase("tube.poal.co") || host.equalsIgnoreCase("invidious.13ad.de") || host.equalsIgnoreCase("yt.elukerio.org");
|
return host.equalsIgnoreCase("invidio.us") || host.equalsIgnoreCase("dev.invidio.us") || host.equalsIgnoreCase("www.invidio.us") || host.equalsIgnoreCase("invidious.snopyta.org") || host.equalsIgnoreCase("de.invidious.snopyta.org") || host.equalsIgnoreCase("fi.invidious.snopyta.org") || host.equalsIgnoreCase("vid.wxzm.sx") || host.equalsIgnoreCase("invidious.kabi.tk") || host.equalsIgnoreCase("invidiou.sh") || host.equalsIgnoreCase("www.invidiou.sh") || host.equalsIgnoreCase("no.invidiou.sh") || host.equalsIgnoreCase("invidious.enkirton.net") || host.equalsIgnoreCase("tube.poal.co") || host.equalsIgnoreCase("invidious.13ad.de") || host.equalsIgnoreCase("yt.elukerio.org");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long parseDurationString(String input)
|
/**
|
||||||
|
* Parses the duration string of the video expecting ":" or "." as seperators
|
||||||
|
* @return the duration in seconds
|
||||||
|
* @throws ParsingException when more than 3 seperators are found
|
||||||
|
*/
|
||||||
|
public static int parseDurationString(final String input)
|
||||||
throws ParsingException, NumberFormatException {
|
throws ParsingException, NumberFormatException {
|
||||||
// If time separator : is not detected, try . instead
|
// If time separator : is not detected, try . instead
|
||||||
final String[] splitInput = input.contains(":")
|
final String[] splitInput = input.contains(":")
|
||||||
|
@ -143,10 +148,10 @@ public class YoutubeParsingHelper {
|
||||||
throw new ParsingException("Error duration string with unknown format: " + input);
|
throw new ParsingException("Error duration string with unknown format: " + input);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((Long.parseLong(Utils.removeNonDigitCharacters(days)) * 24
|
return ((Integer.parseInt(Utils.removeNonDigitCharacters(days)) * 24
|
||||||
+ Long.parseLong(Utils.removeNonDigitCharacters(hours))) * 60
|
+ Integer.parseInt(Utils.removeNonDigitCharacters(hours))) * 60
|
||||||
+ Long.parseLong(Utils.removeNonDigitCharacters(minutes))) * 60
|
+ Integer.parseInt(Utils.removeNonDigitCharacters(minutes))) * 60
|
||||||
+ Long.parseLong(Utils.removeNonDigitCharacters(seconds));
|
+ Integer.parseInt(Utils.removeNonDigitCharacters(seconds));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFeedUrlFrom(final String channelIdOrUser) {
|
public static String getFeedUrlFrom(final String channelIdOrUser) {
|
||||||
|
|
Loading…
Reference in New Issue