From 122c464bb42513a277532224125794c11291717a Mon Sep 17 00:00:00 2001 From: Ramon Date: Tue, 16 May 2017 21:53:11 +0200 Subject: [PATCH] Auto optimisations/cleanups performed by Android Studio... (#7) * Auto optimisations/cleanups performed by Android Studio... * Fixed indentation: uses spaces instead of tabs --- InfoItem.java | 2 +- services/youtube/YoutubeChannelExtractor.java | 6 +----- services/youtube/YoutubeStreamExtractor.java | 6 +----- services/youtube/YoutubeStreamInfoItemExtractor.java | 6 +----- 4 files changed, 4 insertions(+), 16 deletions(-) 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) {