mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-29 00:10:35 +05:30
Add structure of channel tags
Tags' getters and/or setters have been added in ChannelExtractor and ChannelInfo to do so. Co-authored-by: ThetaDev <t.testboy@gmail.com>
This commit is contained in:
parent
356a888d6c
commit
946eb9bd91
@ -47,4 +47,8 @@ public abstract class ChannelExtractor extends Extractor {
|
|||||||
public abstract boolean isVerified() throws ParsingException;
|
public abstract boolean isVerified() throws ParsingException;
|
||||||
@Nonnull
|
@Nonnull
|
||||||
public abstract List<ListLinkHandler> getTabs() throws ParsingException;
|
public abstract List<ListLinkHandler> getTabs() throws ParsingException;
|
||||||
|
@Nonnull
|
||||||
|
public List<String> getTags() throws ParsingException {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,12 @@ public class ChannelInfo extends Info {
|
|||||||
info.addError(e);
|
info.addError(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
info.setTags(extractor.getTags());
|
||||||
|
} catch (final Exception e) {
|
||||||
|
info.addError(e);
|
||||||
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,8 +142,8 @@ public class ChannelInfo extends Info {
|
|||||||
private String description;
|
private String description;
|
||||||
private String[] donationLinks;
|
private String[] donationLinks;
|
||||||
private boolean verified;
|
private boolean verified;
|
||||||
|
|
||||||
private List<ListLinkHandler> tabs = List.of();
|
private List<ListLinkHandler> tabs = List.of();
|
||||||
|
private List<String> tags = List.of();
|
||||||
|
|
||||||
public String getParentChannelName() {
|
public String getParentChannelName() {
|
||||||
return parentChannelName;
|
return parentChannelName;
|
||||||
@ -227,4 +233,13 @@ public class ChannelInfo extends Info {
|
|||||||
public void setTabs(@Nonnull final List<ListLinkHandler> tabs) {
|
public void setTabs(@Nonnull final List<ListLinkHandler> tabs) {
|
||||||
this.tabs = tabs;
|
this.tabs = tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
|
public List<String> getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTags(@Nonnull final List<String> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user