|
1 | | -package org.schabi.newpipe.extractor.stream; |
2 | | - |
3 | 1 | /* |
4 | 2 | * Created by Christian Schabesberger on 10.08.18. |
5 | 3 | * |
6 | 4 | * Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org> |
7 | | - * StreamExtractor.java is part of NewPipe. |
| 5 | + * StreamExtractor.java is part of NewPipe Extractor. |
8 | 6 | * |
9 | | - * NewPipe is free software: you can redistribute it and/or modify |
| 7 | + * NewPipe Extractor is free software: you can redistribute it and/or modify |
10 | 8 | * it under the terms of the GNU General Public License as published by |
11 | 9 | * the Free Software Foundation, either version 3 of the License, or |
12 | 10 | * (at your option) any later version. |
13 | 11 | * |
14 | | - * NewPipe is distributed in the hope that it will be useful, |
| 12 | + * NewPipe Extractor is distributed in the hope that it will be useful, |
15 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | 15 | * GNU General Public License for more details. |
18 | 16 | * |
19 | 17 | * You should have received a copy of the GNU General Public License |
20 | | - * along with NewPipe. If not, see <http://www.gnu.org/licenses/>. |
| 18 | + * along with NewPipe Extractor. If not, see <https://www.gnu.org/licenses/>. |
21 | 19 | */ |
22 | 20 |
|
| 21 | +package org.schabi.newpipe.extractor.stream; |
| 22 | + |
| 23 | +import org.schabi.newpipe.extractor.Image; |
23 | 24 | import org.schabi.newpipe.extractor.InfoItem; |
24 | 25 | import org.schabi.newpipe.extractor.InfoItemsCollector; |
25 | 26 | import org.schabi.newpipe.extractor.InfoItemExtractor; |
@@ -87,13 +88,12 @@ public DateWrapper getUploadDate() throws ParsingException { |
87 | 88 | } |
88 | 89 |
|
89 | 90 | /** |
90 | | - * This will return the url to the thumbnail of the stream. Try to return the medium resolution |
91 | | - * here. |
| 91 | + * This will return the thumbnails of the stream. |
92 | 92 | * |
93 | | - * @return The url of the thumbnail. |
| 93 | + * @return the thumbnails of the stream |
94 | 94 | */ |
95 | 95 | @Nonnull |
96 | | - public abstract String getThumbnailUrl() throws ParsingException; |
| 96 | + public abstract List<Image> getThumbnails() throws ParsingException; |
97 | 97 |
|
98 | 98 | /** |
99 | 99 | * This is the stream description. |
@@ -208,14 +208,18 @@ public long getUploaderSubscriberCount() throws ParsingException { |
208 | 208 | } |
209 | 209 |
|
210 | 210 | /** |
211 | | - * The url to the image file/profile picture/avatar of the creator/uploader of the stream. |
212 | | - * If the url is not available you can return an empty String. |
| 211 | + * The image files/profile pictures/avatars of the creator/uploader of the stream. |
213 | 212 | * |
214 | | - * @return The url of the image file of the uploader or an empty String |
| 213 | + * <p> |
| 214 | + * If they are not available in the stream on specific cases, you must return an empty list for |
| 215 | + * these ones, like it is made by default. |
| 216 | + * </p> |
| 217 | + * |
| 218 | + * @return the avatars of the sub-channel of the stream or an empty list (default) |
215 | 219 | */ |
216 | 220 | @Nonnull |
217 | | - public String getUploaderAvatarUrl() throws ParsingException { |
218 | | - return ""; |
| 221 | + public List<Image> getUploaderAvatars() throws ParsingException { |
| 222 | + return List.of(); |
219 | 223 | } |
220 | 224 |
|
221 | 225 | /** |
@@ -243,14 +247,23 @@ public String getSubChannelName() throws ParsingException { |
243 | 247 | } |
244 | 248 |
|
245 | 249 | /** |
246 | | - * The url to the image file/profile picture/avatar of the sub-channel of the stream. |
247 | | - * If the url is not available you can return an empty String. |
| 250 | + * The avatars of the sub-channel of the stream. |
248 | 251 | * |
249 | | - * @return The url of the image file of the sub-channel or an empty String |
| 252 | + * <p> |
| 253 | + * If they are not available in the stream on specific cases, you must return an empty list for |
| 254 | + * these ones, like it is made by default. |
| 255 | + * </p> |
| 256 | + * |
| 257 | + * <p> |
| 258 | + * If the concept of sub-channels doesn't apply to the stream's service, keep the default |
| 259 | + * implementation. |
| 260 | + * </p> |
| 261 | + * |
| 262 | + * @return the avatars of the sub-channel of the stream or an empty list (default) |
250 | 263 | */ |
251 | 264 | @Nonnull |
252 | | - public String getSubChannelAvatarUrl() throws ParsingException { |
253 | | - return ""; |
| 265 | + public List<Image> getSubChannelAvatars() throws ParsingException { |
| 266 | + return List.of(); |
254 | 267 | } |
255 | 268 |
|
256 | 269 | /** |
|
0 commit comments