1- package org .schabi .newpipe .extractor .channel ;
2-
3- import org .schabi .newpipe .extractor .Info ;
4- import org .schabi .newpipe .extractor .NewPipe ;
5- import org .schabi .newpipe .extractor .StreamingService ;
6- import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
7- import org .schabi .newpipe .extractor .linkhandler .ListLinkHandler ;
8-
9- import java .io .IOException ;
10- import java .util .List ;
11-
12- import javax .annotation .Nonnull ;
13-
141/*
152 * Created by Christian Schabesberger on 31.07.16.
163 *
174 * Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
18- * ChannelInfo.java is part of NewPipe.
5+ * ChannelInfo.java is part of NewPipe Extractor .
196 *
20- * NewPipe is free software: you can redistribute it and/or modify
7+ * NewPipe Extractor is free software: you can redistribute it and/or modify
218 * it under the terms of the GNU General Public License as published by
229 * the Free Software Foundation, either version 3 of the License, or
2310 * (at your option) any later version.
2411 *
25- * NewPipe is distributed in the hope that it will be useful,
12+ * NewPipe Extractor is distributed in the hope that it will be useful,
2613 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2714 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2815 * GNU General Public License for more details.
2916 *
3017 * You should have received a copy of the GNU General Public License
31- * along with NewPipe. If not, see <http ://www.gnu.org/licenses/>.
18+ * along with NewPipe Extractor . If not, see <https ://www.gnu.org/licenses/>.
3219 */
3320
21+ package org .schabi .newpipe .extractor .channel ;
22+
23+ import org .schabi .newpipe .extractor .Info ;
24+ import org .schabi .newpipe .extractor .Image ;
25+ import org .schabi .newpipe .extractor .NewPipe ;
26+ import org .schabi .newpipe .extractor .StreamingService ;
27+ import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
28+ import org .schabi .newpipe .extractor .linkhandler .ListLinkHandler ;
29+
30+ import java .io .IOException ;
31+ import java .util .List ;
32+
33+ import javax .annotation .Nonnull ;
34+
3435public class ChannelInfo extends Info {
3536
3637 public ChannelInfo (final int serviceId ,
@@ -64,13 +65,13 @@ public static ChannelInfo getInfo(final ChannelExtractor extractor)
6465 final ChannelInfo info = new ChannelInfo (serviceId , id , url , originalUrl , name );
6566
6667 try {
67- info .setAvatarUrl (extractor .getAvatarUrl ());
68+ info .setAvatars (extractor .getAvatars ());
6869 } catch (final Exception e ) {
6970 info .addError (e );
7071 }
7172
7273 try {
73- info .setBannerUrl (extractor .getBannerUrl ());
74+ info .setBanners (extractor .getBanners ());
7475 } catch (final Exception e ) {
7576 info .addError (e );
7677 }
@@ -106,7 +107,7 @@ public static ChannelInfo getInfo(final ChannelExtractor extractor)
106107 }
107108
108109 try {
109- info .setParentChannelAvatarUrl (extractor .getParentChannelAvatarUrl ());
110+ info .setParentChannelAvatars (extractor .getParentChannelAvatars ());
110111 } catch (final Exception e ) {
111112 info .addError (e );
112113 }
@@ -132,15 +133,18 @@ public static ChannelInfo getInfo(final ChannelExtractor extractor)
132133 return info ;
133134 }
134135
135- private String avatarUrl ;
136136 private String parentChannelName ;
137137 private String parentChannelUrl ;
138- private String parentChannelAvatarUrl ;
139- private String bannerUrl ;
140138 private String feedUrl ;
141139 private long subscriberCount = -1 ;
142140 private String description ;
143141 private String [] donationLinks ;
142+ @ Nonnull
143+ private List <Image > avatars = List .of ();
144+ @ Nonnull
145+ private List <Image > banners = List .of ();
146+ @ Nonnull
147+ private List <Image > parentChannelAvatars = List .of ();
144148 private boolean verified ;
145149 private List <ListLinkHandler > tabs = List .of ();
146150 private List <String > tags = List .of ();
@@ -161,28 +165,31 @@ public void setParentChannelUrl(final String parentChannelUrl) {
161165 this .parentChannelUrl = parentChannelUrl ;
162166 }
163167
164- public String getParentChannelAvatarUrl () {
165- return parentChannelAvatarUrl ;
168+ @ Nonnull
169+ public List <Image > getParentChannelAvatars () {
170+ return parentChannelAvatars ;
166171 }
167172
168- public void setParentChannelAvatarUrl ( final String parentChannelAvatarUrl ) {
169- this .parentChannelAvatarUrl = parentChannelAvatarUrl ;
173+ public void setParentChannelAvatars ( @ Nonnull final List < Image > parentChannelAvatars ) {
174+ this .parentChannelAvatars = parentChannelAvatars ;
170175 }
171176
172- public String getAvatarUrl () {
173- return avatarUrl ;
177+ @ Nonnull
178+ public List <Image > getAvatars () {
179+ return avatars ;
174180 }
175181
176- public void setAvatarUrl ( final String avatarUrl ) {
177- this .avatarUrl = avatarUrl ;
182+ public void setAvatars ( @ Nonnull final List < Image > avatars ) {
183+ this .avatars = avatars ;
178184 }
179185
180- public String getBannerUrl () {
181- return bannerUrl ;
186+ @ Nonnull
187+ public List <Image > getBanners () {
188+ return banners ;
182189 }
183190
184- public void setBannerUrl ( final String bannerUrl ) {
185- this .bannerUrl = bannerUrl ;
191+ public void setBanners ( @ Nonnull final List < Image > banners ) {
192+ this .banners = banners ;
186193 }
187194
188195 public String getFeedUrl () {
0 commit comments