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;
|
||||
@Nonnull
|
||||
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);
|
||||
}
|
||||
|
||||
try {
|
||||
info.setTags(extractor.getTags());
|
||||
} catch (final Exception e) {
|
||||
info.addError(e);
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -136,8 +142,8 @@ public class ChannelInfo extends Info {
|
|||
private String description;
|
||||
private String[] donationLinks;
|
||||
private boolean verified;
|
||||
|
||||
private List<ListLinkHandler> tabs = List.of();
|
||||
private List<String> tags = List.of();
|
||||
|
||||
public String getParentChannelName() {
|
||||
return parentChannelName;
|
||||
|
@ -227,4 +233,13 @@ public class ChannelInfo extends Info {
|
|||
public void setTabs(@Nonnull final List<ListLinkHandler> tabs) {
|
||||
this.tabs = tabs;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public List<String> getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public void setTags(@Nonnull final List<String> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue