Skip to content

Commit 122c464

Browse files
ram-onTheAssassin
authored andcommitted
Auto optimisations/cleanups performed by Android Studio... (#7)
* Auto optimisations/cleanups performed by Android Studio... * Fixed indentation: uses spaces instead of tabs
1 parent 5907c35 commit 122c464

4 files changed

Lines changed: 4 additions & 16 deletions

File tree

InfoItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424

2525
public interface InfoItem extends Serializable{
26-
public enum InfoType {
26+
enum InfoType {
2727
STREAM,
2828
PLAYLIST,
2929
CHANNEL

services/youtube/YoutubeChannelExtractor.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,7 @@ public AbstractStreamInfo.StreamType getStreamType() throws ParsingException {
171171

172172
@Override
173173
public boolean isAd() throws ParsingException {
174-
if(!li.select("span[class*=\"icon-not-available\"]").isEmpty()) {
175-
return true;
176-
} else {
177-
return false;
178-
}
174+
return !li.select("span[class*=\"icon-not-available\"]").isEmpty();
179175
}
180176

181177
@Override

services/youtube/YoutubeStreamExtractor.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -818,11 +818,7 @@ public AbstractStreamInfo.StreamType getStreamType() throws ParsingException {
818818

819819
@Override
820820
public boolean isAd() throws ParsingException {
821-
if(!li.select("span[class*=\"icon-not-available\"]").isEmpty()) {
822-
return true;
823-
} else {
824-
return false;
825-
}
821+
return !li.select("span[class*=\"icon-not-available\"]").isEmpty();
826822
}
827823

828824
@Override

services/youtube/YoutubeStreamInfoItemExtractor.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,7 @@ public AbstractStreamInfo.StreamType getStreamType() {
164164

165165
@Override
166166
public boolean isAd() throws ParsingException {
167-
if(!item.select("span[class*=\"icon-not-available\"]").isEmpty()) {
168-
return true;
169-
} else {
170-
return false;
171-
}
167+
return !item.select("span[class*=\"icon-not-available\"]").isEmpty();
172168
}
173169

174170
private boolean isLiveStream(Element item) {

0 commit comments

Comments
 (0)