Merge pull request #32 from wb9688/fix-soundcloud

Fix SoundCloud
This commit is contained in:
Christian Schabesberger 2017-09-16 13:50:10 +02:00 committed by GitHub
commit 0774eff775
2 changed files with 8 additions and 4 deletions

View File

@ -59,12 +59,16 @@ public class SoundcloudChannelExtractor extends ChannelExtractor {
}
@Override
public String getBannerUrl() throws ParsingException {
return user.getObject("visuals").getArray("visuals").getObject(0).getString("visual_url", "");
public String getBannerUrl() {
try {
return user.getObject("visuals").getArray("visuals").getObject(0).getString("visual_url", "");
} catch (NullPointerException e) {
return null;
}
}
@Override
public String getFeedUrl() throws ParsingException {
public String getFeedUrl() {
return null;
}

View File

@ -128,7 +128,7 @@ public class SoundcloudStreamExtractor extends StreamExtractor {
@Override
public long getLikeCount() {
return track.getNumber("likes_count", -1).longValue();
return track.getNumber("favoritings_count", -1).longValue();
}
@Override