diff --git a/InfoItem.java b/InfoItem.java index 1e9c2dd5a..344e3a833 100644 --- a/InfoItem.java +++ b/InfoItem.java @@ -23,7 +23,7 @@ import java.io.Serializable; */ public interface InfoItem extends Serializable{ - public enum InfoType { + enum InfoType { STREAM, PLAYLIST, CHANNEL diff --git a/services/youtube/YoutubeChannelExtractor.java b/services/youtube/YoutubeChannelExtractor.java index 0b8fda717..e70e49449 100644 --- a/services/youtube/YoutubeChannelExtractor.java +++ b/services/youtube/YoutubeChannelExtractor.java @@ -171,11 +171,7 @@ public class YoutubeChannelExtractor extends ChannelExtractor { @Override public boolean isAd() throws ParsingException { - if(!li.select("span[class*=\"icon-not-available\"]").isEmpty()) { - return true; - } else { - return false; - } + return !li.select("span[class*=\"icon-not-available\"]").isEmpty(); } @Override diff --git a/services/youtube/YoutubeStreamExtractor.java b/services/youtube/YoutubeStreamExtractor.java index 443f741d5..d6631ac0c 100644 --- a/services/youtube/YoutubeStreamExtractor.java +++ b/services/youtube/YoutubeStreamExtractor.java @@ -818,11 +818,7 @@ public class YoutubeStreamExtractor extends StreamExtractor { @Override public boolean isAd() throws ParsingException { - if(!li.select("span[class*=\"icon-not-available\"]").isEmpty()) { - return true; - } else { - return false; - } + return !li.select("span[class*=\"icon-not-available\"]").isEmpty(); } @Override diff --git a/services/youtube/YoutubeStreamInfoItemExtractor.java b/services/youtube/YoutubeStreamInfoItemExtractor.java index 44d606e2d..7289e138a 100644 --- a/services/youtube/YoutubeStreamInfoItemExtractor.java +++ b/services/youtube/YoutubeStreamInfoItemExtractor.java @@ -164,11 +164,7 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor { @Override public boolean isAd() throws ParsingException { - if(!item.select("span[class*=\"icon-not-available\"]").isEmpty()) { - return true; - } else { - return false; - } + return !item.select("span[class*=\"icon-not-available\"]").isEmpty(); } private boolean isLiveStream(Element item) {