Code improvements

This commit is contained in:
TobiGr 2021-02-15 22:45:02 +01:00
parent e062c8cb0d
commit 5bf9fddba9
3 changed files with 1 additions and 5 deletions

View File

@ -27,11 +27,9 @@ import static org.schabi.newpipe.extractor.services.bandcamp.extractors.Bandcamp
public class BandcampRadioStreamExtractor extends BandcampStreamExtractor { public class BandcampRadioStreamExtractor extends BandcampStreamExtractor {
private JsonObject showInfo; private JsonObject showInfo;
private LinkHandler linkHandler;
public BandcampRadioStreamExtractor(final StreamingService service, final LinkHandler linkHandler) { public BandcampRadioStreamExtractor(final StreamingService service, final LinkHandler linkHandler) {
super(service, linkHandler); super(service, linkHandler);
this.linkHandler = linkHandler;
} }
static JsonObject query(final int id) throws ParsingException { static JsonObject query(final int id) throws ParsingException {
@ -64,7 +62,7 @@ public class BandcampRadioStreamExtractor extends BandcampStreamExtractor {
@Nonnull @Nonnull
@Override @Override
public String getUrl() throws ParsingException { public String getUrl() throws ParsingException {
return linkHandler.getUrl(); return getLinkHandler().getUrl();
} }
@Nonnull @Nonnull

View File

@ -10,7 +10,6 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampChannelLinkHandlerFactory; import org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampChannelLinkHandlerFactory;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
/** /**
* Test for {@link BandcampChannelLinkHandlerFactory} * Test for {@link BandcampChannelLinkHandlerFactory}

View File

@ -10,7 +10,6 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampStreamLinkHandlerFactory; import org.schabi.newpipe.extractor.services.bandcamp.linkHandler.BandcampStreamLinkHandlerFactory;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
/** /**
* Test for {@link BandcampStreamLinkHandlerFactory} * Test for {@link BandcampStreamLinkHandlerFactory}