Skip to content

Commit c00ee75

Browse files
authored
Merge pull request #525 from B0pol/rename
rename getHeartedByCreator and getPinned to isPinned and isHeartedByC…
2 parents 10e8c54 + 2662cec commit c00ee75

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ public void setHeartedByUploader(boolean isHeartedByUploader) {
9292
this.heartedByUploader = isHeartedByUploader;
9393
}
9494

95-
public boolean getHeartedByUploader() {
95+
public boolean isHeartedByUploader() {
9696
return this.heartedByUploader;
9797
}
9898

99-
public boolean getPinned() {
99+
public boolean isPinned() {
100100
return pinned;
101101
}
102102

extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItemExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public interface CommentsInfoItemExtractor extends InfoItemExtractor {
4747
/**
4848
* Whether the comment has been hearted by the uploader
4949
*/
50-
boolean getHeartedByUploader() throws ParsingException;
50+
boolean isHeartedByUploader() throws ParsingException;
5151

5252
/**
5353
* Whether the comment is pinned
5454
*/
55-
boolean getPinned() throws ParsingException;
55+
boolean isPinned() throws ParsingException;
5656
}

extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItemsCollector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ public CommentsInfoItem extract(CommentsInfoItemExtractor extractor) throws Pars
7171
}
7272

7373
try {
74-
resultItem.setHeartedByUploader(extractor.getHeartedByUploader());
74+
resultItem.setHeartedByUploader(extractor.isHeartedByUploader());
7575
} catch (Exception e) {
7676
addError(e);
7777
}
7878

7979
try {
80-
resultItem.setPinned(extractor.getPinned());
80+
resultItem.setPinned(extractor.isPinned());
8181
} catch (Exception e) {
8282
addError(e);
8383
}

extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeCommentsInfoItemExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ public String getUploaderAvatarUrl() {
8989
}
9090

9191
@Override
92-
public boolean getHeartedByUploader() throws ParsingException {
92+
public boolean isHeartedByUploader() throws ParsingException {
9393
return false;
9494
}
9595

9696
@Override
97-
public boolean getPinned() throws ParsingException {
97+
public boolean isPinned() throws ParsingException {
9898
return false;
9999
}
100100

extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/extractors/SoundcloudCommentsInfoItemExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public String getUploaderAvatarUrl() {
4040
}
4141

4242
@Override
43-
public boolean getHeartedByUploader() throws ParsingException {
43+
public boolean isHeartedByUploader() throws ParsingException {
4444
return false;
4545
}
4646

4747
@Override
48-
public boolean getPinned() throws ParsingException {
48+
public boolean isPinned() throws ParsingException {
4949
return false;
5050
}
5151

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ public String getUploaderAvatarUrl() throws ParsingException {
116116
}
117117

118118
@Override
119-
public boolean getHeartedByUploader() throws ParsingException {
119+
public boolean isHeartedByUploader() throws ParsingException {
120120
return json.has("creatorHeart");
121121
}
122122

123123
@Override
124-
public boolean getPinned() {
124+
public boolean isPinned() {
125125
return json.has("pinnedCommentBadge");
126126
}
127127

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeCommentsExtractorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
181181
assertFalse(Utils.isBlank(c.getUrl()));
182182
assertFalse(c.getLikeCount() < 0);
183183
assertFalse(Utils.isBlank(c.getCommentText()));
184-
if (c.getHeartedByUploader()) {
184+
if (c.isHeartedByUploader()) {
185185
heartedByUploader = true;
186186
}
187187
}
@@ -222,7 +222,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
222222
assertFalse(Utils.isBlank(c.getCommentText()));
223223
}
224224

225-
assertTrue("First comment isn't pinned", comments.getItems().get(0).getPinned());
225+
assertTrue("First comment isn't pinned", comments.getItems().get(0).isPinned());
226226
}
227227
}
228228
}

0 commit comments

Comments
 (0)