Skip to content

Commit fc6b45e

Browse files
committed
Implement some methods in PlaylistExtractor
This will prevent their override in each child class where the values corresponding to the methods could not be extracted.
1 parent 40aa510 commit fc6b45e

1 file changed

Lines changed: 28 additions & 7 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistExtractor.java

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,45 @@
88

99
import javax.annotation.Nonnull;
1010

11+
import static org.schabi.newpipe.extractor.utils.Utils.EMPTY_STRING;
12+
1113
public abstract class PlaylistExtractor extends ListExtractor<StreamInfoItem> {
1214

13-
public PlaylistExtractor(StreamingService service, ListLinkHandler linkHandler) {
15+
public PlaylistExtractor(final StreamingService service, final ListLinkHandler linkHandler) {
1416
super(service, linkHandler);
1517
}
1618

17-
public abstract String getThumbnailUrl() throws ParsingException;
18-
public abstract String getBannerUrl() throws ParsingException;
19-
2019
public abstract String getUploaderUrl() throws ParsingException;
2120
public abstract String getUploaderName() throws ParsingException;
2221
public abstract String getUploaderAvatarUrl() throws ParsingException;
2322
public abstract boolean isUploaderVerified() throws ParsingException;
2423

2524
public abstract long getStreamCount() throws ParsingException;
2625

27-
@Nonnull public abstract String getSubChannelName() throws ParsingException;
28-
@Nonnull public abstract String getSubChannelUrl() throws ParsingException;
29-
@Nonnull public abstract String getSubChannelAvatarUrl() throws ParsingException;
26+
@Nonnull
27+
public String getThumbnailUrl() throws ParsingException {
28+
return EMPTY_STRING;
29+
}
30+
31+
@Nonnull
32+
public String getBannerUrl() throws ParsingException {
33+
// Banner can't be handled by frontend right now.
34+
// Whoever is willing to implement this should also implement it in the frontend.
35+
return EMPTY_STRING;
36+
}
37+
38+
@Nonnull
39+
public String getSubChannelName() throws ParsingException {
40+
return EMPTY_STRING;
41+
}
3042

43+
@Nonnull
44+
public String getSubChannelUrl() throws ParsingException {
45+
return EMPTY_STRING;
46+
}
47+
48+
@Nonnull
49+
public String getSubChannelAvatarUrl() throws ParsingException {
50+
return EMPTY_STRING;
51+
}
3152
}

0 commit comments

Comments
 (0)