parent
acb04eb351
commit
6a70cb9d50
|
@ -46,7 +46,7 @@ public class SoundcloudStreamExtractor extends StreamExtractor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFetchPage(@Nonnull Downloader downloader) throws IOException, ExtractionException {
|
public void onFetchPage(@Nonnull Downloader downloader) throws IOException, ExtractionException {
|
||||||
track = SoundcloudParsingHelper.resolveFor(downloader, getOriginalUrl());
|
track = SoundcloudParsingHelper.resolveFor(downloader, getUrl());
|
||||||
|
|
||||||
String policy = track.getString("policy", EMPTY_STRING);
|
String policy = track.getString("policy", EMPTY_STRING);
|
||||||
if (!policy.equals("ALLOW") && !policy.equals("MONETIZE")) {
|
if (!policy.equals("ALLOW") && !policy.equals("MONETIZE")) {
|
||||||
|
|
|
@ -30,6 +30,8 @@ public class SoundcloudStreamLinkHandlerFactory extends LinkHandlerFactory {
|
||||||
@Override
|
@Override
|
||||||
public String getId(String url) throws ParsingException {
|
public String getId(String url) throws ParsingException {
|
||||||
Utils.checkUrl(URL_PATTERN, url);
|
Utils.checkUrl(URL_PATTERN, url);
|
||||||
|
// Remove the tailing slash from URLs due to issues with the SoundCloud API
|
||||||
|
if (url.charAt(url.length() -1) == '/') url = url.substring(0, url.length()-1);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return SoundcloudParsingHelper.resolveIdWithEmbedPlayer(url);
|
return SoundcloudParsingHelper.resolveIdWithEmbedPlayer(url);
|
||||||
|
|
Loading…
Reference in New Issue