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;
import org.json.JSONObject;
import org.schabi.newpipe.extractor.NewPipe;
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.stream.StreamInfoItemExtractor;
import org.schabi.newpipe.extractor.stream.StreamType;
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.BandcampRadioStreamExtractor.query;
public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
@ -37,7 +33,7 @@ public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
@Nullable
@Override
public String getTextualUploadDate() {
return show.getString("date");
return show.getString("date").replace(" 00:00:00 GMT", "");
}
@Nullable
@ -48,7 +44,7 @@ public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
@Override
public String getName() throws ParsingException {
return show.getString("date");
return show.getString("subtitle");
}
@Override

View file

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