Skip to content

Commit adde433

Browse files
committed
Code improvements
1 parent ea120a4 commit adde433

5 files changed

Lines changed: 11 additions & 23 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@ public static JsonObject getArtistDetails(String id) throws ParsingException {
119119
/**
120120
* @param id The image ID
121121
* @param album Whether this is the cover of an album
122-
* @return Url of image with this ID in size 10 which is 1200x1200 (we could also choose size 0
123-
* but we don't want something as large as 3460x3460 here, do we?)
122+
* @return URL of image with this ID in size 10 which is 1200x1200 (we could also choose size 0
123+
* but we don't want something as large as 3460x3460 here)
124124
*/
125125
public static String getImageUrl(final long id, final boolean album) {
126126
return "https://f4.bcbits.com/img/" + (album ? 'a' : "") + id + "_10.jpg";
127127
}
128128

129129
/**
130-
* @return <code>true</code> if the given url looks like it comes from a bandcamp custom domain
131-
* or if it comes from bandcamp.com itself
130+
* @return <code>true</code> if the given URL looks like it comes from a bandcamp custom domain
131+
* or if it comes from <code>bandcamp.com</code> itself
132132
*/
133133
public static boolean isSupportedDomain(final String url) throws ParsingException {
134134

@@ -151,7 +151,7 @@ public static boolean isSupportedDomain(final String url) throws ParsingExceptio
151151
/**
152152
* Whether the URL points to a radio kiosk.
153153
* @param url the URL to check
154-
* @return true if the URL is <code>https://bandcamp.com/?show=SHOW_ID</code>
154+
* @return true if the URL matches <code>https://bandcamp.com/?show=SHOW_ID</code>
155155
*/
156156
public static boolean isRadioUrl(final String url) {
157157
return url.toLowerCase().matches("https?://bandcamp\\.com/\\?show=\\d+");

extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampDiscographStreamInfoItemExtractor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ public String getUploaderName() {
1818
return discograph.getString("band_name");
1919
}
2020

21-
@Override
22-
public boolean isUploaderVerified() throws ParsingException {
23-
return false;
24-
}
25-
2621
@Override
2722
public String getName() {
2823
return discograph.getString("title");

extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampPlaylistStreamInfoItemExtractor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ public String getUploaderName() {
5353
return "";
5454
}
5555

56-
@Override
57-
public boolean isUploaderVerified() throws ParsingException {
58-
return false;
59-
}
60-
6156
/**
6257
* Each track can have its own cover art. Therefore, unless a substitute is provided,
6358
* the thumbnail is extracted using a stream extractor.

extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampSearchStreamInfoItemExtractor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ public String getUploaderName() {
2424
}
2525
}
2626

27-
@Override
28-
public boolean isUploaderVerified() throws ParsingException {
29-
return false;
30-
}
31-
3227
@Override
3328
public String getName() throws ParsingException {
3429
return resultInfo.getElementsByClass("heading").text();

extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampStreamInfoItemExtractor.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.schabi.newpipe.extractor.services.bandcamp.extractors.streaminfoitem;
22

3+
import org.schabi.newpipe.extractor.exceptions.ParsingException;
34
import org.schabi.newpipe.extractor.localization.DateWrapper;
45
import org.schabi.newpipe.extractor.stream.StreamInfoItemExtractor;
56
import org.schabi.newpipe.extractor.stream.StreamType;
@@ -44,9 +45,11 @@ public DateWrapper getUploadDate() {
4445
return null;
4546
}
4647

47-
/**
48-
* There are no ads just like that, duh
49-
*/
48+
@Override
49+
public boolean isUploaderVerified() throws ParsingException {
50+
return false;
51+
}
52+
5053
@Override
5154
public boolean isAd() {
5255
return false;

0 commit comments

Comments
 (0)