From e39147202cdcc3caa36d090431c6b0723c0b0d9e Mon Sep 17 00:00:00 2001 From: wb9688 Date: Sat, 30 May 2020 09:31:08 +0200 Subject: [PATCH] Fix YouTube video duration parsing --- .../extractor/services/youtube/YoutubeParsingHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java index 88fec795..6df9b4b8 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java @@ -142,9 +142,9 @@ public class YoutubeParsingHelper { default: throw new ParsingException("Error duration string with unknown format: " + input); } - return (((Long.parseLong(Utils.removeNonDigitCharacters(days)) * 24) + return ((((Long.parseLong(Utils.removeNonDigitCharacters(days)) * 24) + Long.parseLong(Utils.removeNonDigitCharacters(hours)) * 60) - + Long.parseLong(Utils.removeNonDigitCharacters(minutes)) * 60) + + Long.parseLong(Utils.removeNonDigitCharacters(minutes))) * 60) + Long.parseLong(Utils.removeNonDigitCharacters(seconds)); }