Skip to content

Commit 8195538

Browse files
committed
Fix checkstyle
1 parent b83be12 commit 8195538

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemLockupExtractor.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public StreamType getStreamType() {
6868

6969
@Override
7070
public boolean isAd() throws ParsingException {
71-
if(isPremium()) {
71+
if (isPremium()) {
7272
return true;
7373
}
7474
final String name = getName(); // only get it once
@@ -113,12 +113,12 @@ public long getDuration() throws ParsingException {
113113
.getString("text"))
114114
.collect(Collectors.toList());
115115

116-
if(potentialDurations.isEmpty()) {
116+
if (potentialDurations.isEmpty()) {
117117
throw new ParsingException("Could not get duration: No parsable durations detected");
118118
}
119119

120120
ParsingException parsingException = null;
121-
for(final String potentialDuration : potentialDurations) {
121+
for (final String potentialDuration : potentialDurations) {
122122
try {
123123
return YoutubeParsingHelper.parseDurationString(potentialDuration);
124124
} catch (final ParsingException ex) {
@@ -140,10 +140,10 @@ public String getUploaderName() throws ParsingException {
140140
@Override
141141
public String getUploaderUrl() throws ParsingException {
142142
final String channelId = JsonUtils.getString(lockupViewModel,
143-
"metadata.lockupMetadataViewModel.image.decoratedAvatarViewModel" +
144-
".rendererContext.commandContext.onTap" +
145-
".innertubeCommand.browseEndpoint.browseId");
146-
if(isNullOrEmpty(channelId)) {
143+
"metadata.lockupMetadataViewModel.image.decoratedAvatarViewModel"
144+
+ ".rendererContext.commandContext.onTap"
145+
+ ".innertubeCommand.browseEndpoint.browseId");
146+
if (isNullOrEmpty(channelId)) {
147147
throw new ParsingException("Could not get uploader url");
148148
}
149149
return YoutubeChannelLinkHandlerFactory.getInstance().getUrl(channelId);
@@ -154,8 +154,8 @@ public String getUploaderUrl() throws ParsingException {
154154
public List<Image> getUploaderAvatars() throws ParsingException {
155155
return YoutubeParsingHelper.getImagesFromThumbnailsArray(
156156
JsonUtils.getArray(lockupViewModel,
157-
"metadata.lockupMetadataViewModel.image.decoratedAvatarViewModel" +
158-
".avatar.avatarViewModel.image.sources"));
157+
"metadata.lockupMetadataViewModel.image.decoratedAvatarViewModel"
158+
+ ".avatar.avatarViewModel.image.sources"));
159159
}
160160

161161
@Override
@@ -192,7 +192,7 @@ public String getTextualUploadDate() throws ParsingException {
192192
@Nullable
193193
@Override
194194
public DateWrapper getUploadDate() throws ParsingException {
195-
if(timeAgoParser == null) {
195+
if (timeAgoParser == null) {
196196
return null;
197197
}
198198

@@ -209,7 +209,7 @@ public long getViewCount() throws ParsingException {
209209
final Optional<String> optTextContent = metadataPart(1, 0)
210210
.map(this::getTextContentFromMetadataPart);
211211
// We could do this inline if the ParsingException would be a RuntimeException -.-
212-
if(optTextContent.isPresent()) {
212+
if (optTextContent.isPresent()) {
213213
return getViewCountFromViewCountText(optTextContent.get());
214214
}
215215
return -1;
@@ -248,8 +248,8 @@ protected boolean isPremiere() {
248248
protected Optional<JsonObject> metadataPart(final int rowIndex, final int partIndex)
249249
throws ParsingException {
250250
return JsonUtils.getArray(lockupViewModel,
251-
"metadata.lockupMetadataViewModel.metadata." +
252-
"contentMetadataViewModel.metadataRows")
251+
"metadata.lockupMetadataViewModel.metadata"
252+
+ ".contentMetadataViewModel.metadataRows")
253253
.streamAsJsonObjects()
254254
.skip(rowIndex)
255255
.limit(1)

0 commit comments

Comments
 (0)