|
1 | | -package org.schabi.newpipe.extractor.user; |
| 1 | +package org.schabi.newpipe.extractor.channel; |
2 | 2 |
|
3 | 3 | import org.schabi.newpipe.extractor.ListExtractor.NextItemsResult; |
4 | 4 | import org.schabi.newpipe.extractor.ListInfo; |
|
16 | 16 | * Created by Christian Schabesberger on 31.07.16. |
17 | 17 | * |
18 | 18 | * Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org> |
19 | | - * UserInfo.java is part of NewPipe. |
| 19 | + * ChannelInfo.java is part of NewPipe. |
20 | 20 | * |
21 | 21 | * NewPipe is free software: you can redistribute it and/or modify |
22 | 22 | * it under the terms of the GNU General Public License as published by |
|
32 | 32 | * along with NewPipe. If not, see <http://www.gnu.org/licenses/>. |
33 | 33 | */ |
34 | 34 |
|
35 | | -public class UserInfo extends ListInfo { |
| 35 | +public class ChannelInfo extends ListInfo { |
36 | 36 |
|
37 | 37 | public static NextItemsResult getMoreItems(ServiceList serviceItem, String nextStreamsUrl) throws IOException, ExtractionException { |
38 | 38 | return getMoreItems(serviceItem.getService(), nextStreamsUrl); |
39 | 39 | } |
40 | 40 |
|
41 | 41 | public static NextItemsResult getMoreItems(StreamingService service, String nextStreamsUrl) throws IOException, ExtractionException { |
42 | | - return service.getUserExtractor(null, nextStreamsUrl).getNextStreams(); |
| 42 | + return service.getChannelExtractor(null, nextStreamsUrl).getNextStreams(); |
43 | 43 | } |
44 | 44 |
|
45 | | - public static UserInfo getInfo(String url) throws IOException, ExtractionException { |
| 45 | + public static ChannelInfo getInfo(String url) throws IOException, ExtractionException { |
46 | 46 | return getInfo(NewPipe.getServiceByUrl(url), url); |
47 | 47 | } |
48 | 48 |
|
49 | | - public static UserInfo getInfo(ServiceList serviceItem, String url) throws IOException, ExtractionException { |
| 49 | + public static ChannelInfo getInfo(ServiceList serviceItem, String url) throws IOException, ExtractionException { |
50 | 50 | return getInfo(serviceItem.getService(), url); |
51 | 51 | } |
52 | 52 |
|
53 | | - public static UserInfo getInfo(StreamingService service, String url) throws IOException, ExtractionException { |
54 | | - return getInfo(service.getUserExtractor(url)); |
| 53 | + public static ChannelInfo getInfo(StreamingService service, String url) throws IOException, ExtractionException { |
| 54 | + return getInfo(service.getChannelExtractor(url)); |
55 | 55 | } |
56 | 56 |
|
57 | | - public static UserInfo getInfo(UserExtractor extractor) throws ParsingException { |
58 | | - UserInfo info = new UserInfo(); |
| 57 | + public static ChannelInfo getInfo(ChannelExtractor extractor) throws ParsingException { |
| 58 | + ChannelInfo info = new ChannelInfo(); |
59 | 59 |
|
60 | 60 | // important data |
61 | 61 | info.service_id = extractor.getServiceId(); |
62 | 62 | info.url = extractor.getCleanUrl(); |
63 | | - info.id = extractor.getUserId(); |
64 | | - info.name = extractor.getUserName(); |
| 63 | + info.id = extractor.getId(); |
| 64 | + info.name = extractor.getName(); |
65 | 65 |
|
66 | 66 | try { |
67 | 67 | info.avatar_url = extractor.getAvatarUrl(); |
|
0 commit comments