From 102f04e29795ff3d07583373ef0398ee8365c165 Mon Sep 17 00:00:00 2001 From: wb9688 Date: Tue, 12 May 2020 09:14:29 +0200 Subject: [PATCH] Add sub-channel stuff to PlaylistInfo --- .../extractor/playlist/PlaylistInfo.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistInfo.java b/extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistInfo.java index f8c307380..089b1de55 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistInfo.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistInfo.java @@ -84,6 +84,21 @@ public class PlaylistInfo extends ListInfo { info.setUploaderAvatarUrl(""); uploaderParsingErrors.add(e); } + try { + info.setSubChannelUrl(extractor.getSubChannelUrl()); + } catch (Exception e) { + uploaderParsingErrors.add(e); + } + try { + info.setSubChannelName(extractor.getSubChannelName()); + } catch (Exception e) { + uploaderParsingErrors.add(e); + } + try { + info.setSubChannelAvatarUrl(extractor.getSubChannelAvatarUrl()); + } catch (Exception e) { + uploaderParsingErrors.add(e); + } try { info.setBannerUrl(extractor.getBannerUrl()); } catch (Exception e) { @@ -107,6 +122,9 @@ public class PlaylistInfo extends ListInfo { private String uploaderUrl; private String uploaderName; private String uploaderAvatarUrl; + private String subChannelUrl; + private String subChannelName; + private String subChannelAvatarUrl; private long streamCount = 0; public String getThumbnailUrl() { @@ -149,6 +167,30 @@ public class PlaylistInfo extends ListInfo { this.uploaderAvatarUrl = uploaderAvatarUrl; } + public String getSubChannelUrl() { + return subChannelUrl; + } + + public void setSubChannelUrl(String subChannelUrl) { + this.subChannelUrl = subChannelUrl; + } + + public String getSubChannelName() { + return subChannelName; + } + + public void setSubChannelName(String subChannelName) { + this.subChannelName = subChannelName; + } + + public String getSubChannelAvatarUrl() { + return subChannelAvatarUrl; + } + + public void setSubChannelAvatarUrl(String subChannelAvatarUrl) { + this.subChannelAvatarUrl = subChannelAvatarUrl; + } + public long getStreamCount() { return streamCount; }