more improvements of comments
Co-Authored-By: Stypox <stypox@pm.me>
This commit is contained in:
parent
0a4115286b
commit
a129c65c63
|
@ -263,7 +263,7 @@ public abstract class StreamingService {
|
|||
|
||||
public CommentsExtractor getCommentsExtractor(String url) throws ExtractionException {
|
||||
ListLinkHandlerFactory llhf = getCommentsLHFactory();
|
||||
if (null == llhf) {
|
||||
if (llhf == null) {
|
||||
return null;
|
||||
}
|
||||
return getCommentsExtractor(llhf.fromUrl(url));
|
||||
|
|
|
@ -43,7 +43,7 @@ public class PeertubeInstance {
|
|||
throw new Exception("unable to configure instance " + url, e);
|
||||
}
|
||||
|
||||
if (null == response || StringUtil.isBlank(response.responseBody())) {
|
||||
if (response == null || StringUtil.isBlank(response.responseBody())) {
|
||||
throw new Exception("unable to configure instance " + url);
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ public class PeertubeChannelExtractor extends ChannelExtractor {
|
|||
} catch (JsonParserException e) {
|
||||
throw new ExtractionException("Unable to extract peertube channel data", e);
|
||||
}
|
||||
if (null == json) throw new ExtractionException("Unable to extract PeerTube channel data");
|
||||
if (json == null) throw new ExtractionException("Unable to extract PeerTube channel data");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -133,7 +133,7 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
|
|||
}
|
||||
|
||||
private void fetchTitle(JsonArray contents) {
|
||||
if (null == title) {
|
||||
if (title == null) {
|
||||
try {
|
||||
title = getYoutubeText(JsonUtils.getObject(contents.getObject(0), "commentThreadRenderer.commentTargetTitle"));
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -68,7 +68,7 @@ public class YoutubePlaylistExtractor extends PlaylistExtractor {
|
|||
@Override
|
||||
public String getBannerUrl() {
|
||||
return ""; // Banner can't be handled by frontend right now.
|
||||
// Whoever is willing to implement this should also implement this in the front end.
|
||||
// Whoever is willing to implement this should also implement it in the frontend.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -335,10 +335,10 @@ public abstract class StreamExtractor extends Extractor {
|
|||
try {
|
||||
timeStamp = Parser.matchGroup1(regexPattern, getOriginalUrl());
|
||||
} catch (Parser.RegexException e) {
|
||||
// catch this instantly since an url does not necessarily have to have a time stamp
|
||||
// catch this instantly since a url does not necessarily have a timestamp
|
||||
|
||||
// -2 because the testing system will consequently know that the regex failed
|
||||
// not good i know
|
||||
// not good, I know
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue