From 1eca63089b88e4c27c38e70fe17760cf89ab00db Mon Sep 17 00:00:00 2001 From: wb9688 Date: Mon, 24 Feb 2020 12:55:51 +0100 Subject: [PATCH] Count private and deleted videos as ad --- .../youtube/extractors/YoutubeStreamInfoItemExtractor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemExtractor.java index bf06774c8..605053bb3 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemExtractor.java @@ -60,8 +60,8 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor { } @Override - public boolean isAd() { - return isPremium(); + public boolean isAd() throws ParsingException { + return isPremium() || getName().equals("[Private video]") || getName().equals("[Deleted video]"); } @Override