mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 22:30:33 +05:30
[SoundCloud] Fix concurrency issue when getting the client id
This commit is contained in:
parent
92f6754f0f
commit
d2f1c0f40d
@ -43,13 +43,15 @@ public class SoundcloudParsingHelper {
|
||||
private SoundcloudParsingHelper() {
|
||||
}
|
||||
|
||||
public static String clientId() throws ExtractionException, IOException {
|
||||
public synchronized static String clientId() throws ExtractionException, IOException {
|
||||
if (!isNullOrEmpty(clientId)) return clientId;
|
||||
|
||||
Downloader dl = NewPipe.getDownloader();
|
||||
clientId = HARDCODED_CLIENT_ID;
|
||||
if (checkIfHardcodedClientIdIsValid()) {
|
||||
return clientId;
|
||||
} else {
|
||||
clientId = null;
|
||||
}
|
||||
|
||||
final Response download = dl.get("https://soundcloud.com");
|
||||
|
Loading…
Reference in New Issue
Block a user