File tree Expand file tree Collapse file tree
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .schabi .newpipe .extractor .services .youtube ;
22
3-
43import com .grack .nanojson .JsonArray ;
54import com .grack .nanojson .JsonObject ;
65import com .grack .nanojson .JsonParser ;
@@ -111,9 +110,7 @@ public static boolean isInvidioURL(URL url) {
111110
112111 public static long parseDurationString (String input )
113112 throws ParsingException , NumberFormatException {
114-
115113 // If time separator : is not detected, try . instead
116-
117114 final String [] splitInput = input .contains (":" )
118115 ? input .split (":" )
119116 : input .split ("\\ ." );
@@ -145,10 +142,10 @@ public static long parseDurationString(String input)
145142 default :
146143 throw new ParsingException ("Error duration string with unknown format: " + input );
147144 }
148- return (((( Long .parseLong (days ) * 24 )
149- + Long .parseLong (hours ) * 60 )
150- + Long .parseLong (minutes )) * 60 )
151- + Long .parseLong (seconds );
145+ return (((Long .parseLong (Utils . removeNonDigitCharacters ( days ) ) * 24 )
146+ + Long .parseLong (Utils . removeNonDigitCharacters ( hours ) ) * 60 )
147+ + Long .parseLong (Utils . removeNonDigitCharacters ( minutes )) * 60 )
148+ + Long .parseLong (Utils . removeNonDigitCharacters ( seconds ) );
152149 }
153150
154151 public static String getFeedUrlFrom (final String channelIdOrUser ) {
You can’t perform that action at this time.
0 commit comments