diff --git a/app/src/main/java/org/schabi/newpipe/extractor/AudioStream.java b/app/src/main/java/org/schabi/newpipe/extractor/AudioStream.java index a464926c9..807ae666e 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/AudioStream.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/AudioStream.java @@ -40,7 +40,7 @@ public class AudioStream { // revelas wether two streams are equal public boolean equals(AudioStream cmp) { - return equalStats(cmp) + return cmp != null && equalStats(cmp) && url == cmp.url; } } diff --git a/app/src/main/java/org/schabi/newpipe/extractor/VideoStream.java b/app/src/main/java/org/schabi/newpipe/extractor/VideoStream.java index 8f49b193d..b1642f2c6 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/VideoStream.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/VideoStream.java @@ -38,7 +38,7 @@ public class VideoStream { // revelas wether two streams are equal public boolean equals(VideoStream cmp) { - return equalStats(cmp) + return cmp != null && equalStats(cmp) && url == cmp.url; } } diff --git a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java index 260fc42d4..1419e35ce 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractor.java @@ -599,7 +599,7 @@ public class YoutubeStreamExtractor extends StreamExtractor { public String getAverageRating() throws ParsingException { try { if (playerArgs == null) { - videoInfoPage.get("avg_rating"); + return videoInfoPage.get("avg_rating"); } return playerArgs.getString("avg_rating"); } catch (JSONException e) {