1
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-10-06 00:23:15 +02:00

[SoundCloud] SoundCloudStreamExtractor.getTimeStamp return 0 if no timestamp in url

This commit is contained in:
David Asunmo
2025-06-04 05:06:13 +01:00
committed by Stypox
parent d9af459ecf
commit 5fcd97104c

View File

@@ -121,7 +121,8 @@ public class SoundcloudStreamExtractor extends StreamExtractor {
@Override
public long getTimeStamp() throws ParsingException {
return getTimestampSeconds("(#t=\\d{0,3}h?\\d{0,3}m?\\d{1,3}s?)");
final var timestamp = getTimestampSeconds("(#t=\\d{0,3}h?\\d{0,3}m?\\d{1,3}s?)");
return timestamp == -2 ? 0 : timestamp;
}
@Override
@@ -170,7 +171,7 @@ public class SoundcloudStreamExtractor extends StreamExtractor {
try {
final JsonArray transcodings = track.getObject("media")
.getArray("transcodings");
.getArray("transcodings");
if (!isNullOrEmpty(transcodings)) {
// Get information about what stream formats are available
extractAudioStreams(transcodings, audioStreams);