diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampChannelExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampChannelExtractor.java index ef2835d26..3b6adf7b9 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampChannelExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampChannelExtractor.java @@ -38,8 +38,8 @@ public class BandcampChannelExtractor extends ChannelExtractor { @Override public String getBannerUrl() throws ParsingException { /* - * Why does the mobile endpoint not contain the header?? Or at least not the same one? - * Anyway we're back to querying websites + * Mobile API does not return the header or not the correct header. + * Therefore, we need to query the website */ try { final String html = getDownloader() @@ -61,8 +61,7 @@ public class BandcampChannelExtractor extends ChannelExtractor { } /** - * bandcamp stopped providing RSS feeds when appending /feed to any URL - * because too few people used it. + * Bandcamp discontinued their RSS feeds because it hadn't been used enough. */ @Override public String getFeedUrl() { @@ -108,7 +107,7 @@ public class BandcampChannelExtractor extends ChannelExtractor { final JsonArray discography = channelInfo.getArray("discography"); for (int i = 0; i < discography.size(); i++) { - // I define discograph as an item that can appear in a discography + // A discograph is as an item appears in a discography final JsonObject discograph = discography.getObject(i); if (!discograph.getString("item_type").equals("track")) continue; diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java index 970cddc9e..69870444e 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java @@ -71,10 +71,14 @@ public class BandcampExtractorHelper { } /** + * Generate image url from image ID. + *
+ * The appendix "_10" was chosen because it provides images sized 1200x1200. Other integer
+ * values are possible as well (e.g. 0 is a very large resolution, possibly the original).
+ *
* @param id The image ID
- * @param album Whether this is the cover of an album
- * @return URL of image with this ID in size 10 which is 1200x1200 (we could also choose size 0
- * but we don't want something as large as 3460x3460 here)
+ * @param album True if this is the cover of an album or track
+ * @return URL of image with this ID sized 1200x1200
*/
public static String getImageUrl(final long id, final boolean album) {
return "https://f4.bcbits.com/img/" + (album ? 'a' : "") + id + "_10.jpg";
diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioInfoItemExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioInfoItemExtractor.java
index 2331f258c..7ecc31844 100644
--- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioInfoItemExtractor.java
+++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioInfoItemExtractor.java
@@ -24,8 +24,8 @@ public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
@Override
public long getDuration() {
/* Duration is only present in the more detailed information that has to be queried separately.
- * Because the servers would probably not like over 300 queries every time someone opens the kiosk,
- * we're just providing 0 here.
+ * Therefore, over 300 queries would be needed every time the kiosk is opened if we were to
+ * display the real value.
*/
//return query(show.getInt("id")).getLong("audio_duration");
return 0;
diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java
index 000f884b0..ba24c4a72 100644
--- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java
+++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampRadioStreamExtractor.java
@@ -54,7 +54,10 @@ public class BandcampRadioStreamExtractor extends BandcampStreamExtractor {
@Nonnull
@Override
public String getName() throws ParsingException {
- return showInfo.getString("subtitle"); // "audio_title" is a boring title
+ /* Select "subtitle" and not "audio_title", as the latter would cause a lot of
+ * items to show the same title, e.g. "Bandcamp Weekly".
+ */
+ return showInfo.getString("subtitle");
}
@Nonnull
diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampSearchExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampSearchExtractor.java
index a0648304c..12585da39 100644
--- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampSearchExtractor.java
+++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampSearchExtractor.java
@@ -48,7 +48,6 @@ public class BandcampSearchExtractor extends SearchExtractor {
}
public InfoItemsPage