Bandcamp radio: proper name, date shortened

This commit is contained in:
Fynn Godau 2019-12-22 17:36:50 +01:00
parent 808c8aa087
commit f0d36dfa7e
2 changed files with 3 additions and 9 deletions

View File

@ -3,18 +3,14 @@
package org.schabi.newpipe.extractor.services.bandcamp.extractors; package org.schabi.newpipe.extractor.services.bandcamp.extractors;
import org.json.JSONObject; import org.json.JSONObject;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.extractor.localization.DateWrapper; import org.schabi.newpipe.extractor.localization.DateWrapper;
import org.schabi.newpipe.extractor.stream.StreamInfoItemExtractor; import org.schabi.newpipe.extractor.stream.StreamInfoItemExtractor;
import org.schabi.newpipe.extractor.stream.StreamType; import org.schabi.newpipe.extractor.stream.StreamType;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.io.IOException;
import static org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampChannelExtractor.getImageUrl; import static org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampChannelExtractor.getImageUrl;
import static org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampRadioStreamExtractor.query;
public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor { public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
@ -37,7 +33,7 @@ public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
@Nullable @Nullable
@Override @Override
public String getTextualUploadDate() { public String getTextualUploadDate() {
return show.getString("date"); return show.getString("date").replace(" 00:00:00 GMT", "");
} }
@Nullable @Nullable
@ -48,7 +44,7 @@ public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
@Override @Override
public String getName() throws ParsingException { public String getName() throws ParsingException {
return show.getString("date"); return show.getString("subtitle");
} }
@Override @Override

View File

@ -1,6 +1,5 @@
package org.schabi.newpipe.extractor.services.bandcamp.extractors; package org.schabi.newpipe.extractor.services.bandcamp.extractors;
import org.json.JSONArray;
import org.json.JSONObject; import org.json.JSONObject;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.MediaFormat;
@ -11,7 +10,6 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException; import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.extractor.linkhandler.LinkHandler; import org.schabi.newpipe.extractor.linkhandler.LinkHandler;
import org.schabi.newpipe.extractor.localization.DateWrapper;
import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.AudioStream;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
@ -76,7 +74,7 @@ public class BandcampRadioStreamExtractor extends BandcampStreamExtractor {
@Nullable @Nullable
@Override @Override
public String getTextualUploadDate() { public String getTextualUploadDate() {
return showInfo.getString("published_date"); return showInfo.getString("published_date").replace(" 00:00:00 GMT", "");
} }
@Nonnull @Nonnull