Skip to content

Commit 15f83a1

Browse files
[SoundCloud] make SoundcloudStreamExtractor.getTimeStamp return 0 if no timestamp
1 parent 7433bea commit 15f83a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/extractors/SoundcloudStreamExtractor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ public long getLength() {
121121

122122
@Override
123123
public long getTimeStamp() throws ParsingException {
124-
return getTimestampSeconds("(#t=\\d{0,3}h?\\d{0,3}m?\\d{1,3}s?)");
124+
final var timestamp = getTimestampSeconds("(#t=\\d{0,3}h?\\d{0,3}m?\\d{1,3}s?)");
125+
return timestamp == -2 ? 0 : timestamp;
125126
}
126127

127128
@Override

0 commit comments

Comments
 (0)