55import org .schabi .newpipe .extractor .NewPipe ;
66import org .schabi .newpipe .extractor .StreamingService ;
77import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
8- import org .schabi .newpipe .extractor .exceptions .ParsingException ;
98import org .schabi .newpipe .extractor .linkhandler .ListLinkHandler ;
10- import org .schabi .newpipe .extractor .localization .Localization ;
119import org .schabi .newpipe .extractor .stream .StreamInfoItem ;
1210import org .schabi .newpipe .extractor .utils .ExtractorHelper ;
1311
3533
3634public class ChannelInfo extends ListInfo <StreamInfoItem > {
3735
38- public ChannelInfo (int serviceId , ListLinkHandler linkHandler , String name ) throws ParsingException {
39- super (serviceId , linkHandler , name );
36+ public ChannelInfo (int serviceId , String id , String url , String originalUrl , String name , ListLinkHandler listLinkHandler ) {
37+ super (serviceId , id , url , originalUrl , name , listLinkHandler . getContentFilters (), listLinkHandler . getSortFilter () );
4038 }
4139
4240 public static ChannelInfo getInfo (String url ) throws IOException , ExtractionException {
@@ -57,15 +55,14 @@ public static InfoItemsPage<StreamInfoItem> getMoreItems(StreamingService servic
5755
5856 public static ChannelInfo getInfo (ChannelExtractor extractor ) throws IOException , ExtractionException {
5957
60- ChannelInfo info = new ChannelInfo (extractor .getServiceId (),
61- extractor .getLinkHandler (),
62- extractor .getName ());
58+ final int serviceId = extractor .getServiceId ();
59+ final String id = extractor .getId ();
60+ final String url = extractor .getUrl ();
61+ final String originalUrl = extractor .getOriginalUrl ();
62+ final String name = extractor .getName ();
63+
64+ final ChannelInfo info = new ChannelInfo (serviceId , id , url , originalUrl , name , extractor .getLinkHandler ());
6365
64- try {
65- info .setOriginalUrl (extractor .getOriginalUrl ());
66- } catch (Exception e ) {
67- info .addError (e );
68- }
6966 try {
7067 info .setAvatarUrl (extractor .getAvatarUrl ());
7168 } catch (Exception e ) {
0 commit comments