Channels are now an Info

The previous "main" tab is now just a normal tab returned in getTabs().
Various part of the code that used to handle channels as ListInfo now either take the first (playable, i.e. with streams) tab (e.g. the ChannelTabPlayQueue), or take all of them combined (e.g. the feed).
This commit is contained in:
Stypox 2023-04-14 10:19:58 +02:00
parent a735063c5c
commit aa4ec2f39e
19 changed files with 301 additions and 362 deletions

View file

@ -19,7 +19,7 @@ import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.fragments.BlankFragment;
import org.schabi.newpipe.fragments.list.channel.ChannelVideosFragment;
import org.schabi.newpipe.fragments.list.channel.ChannelFragment;
import org.schabi.newpipe.fragments.list.kiosk.DefaultKioskFragment;
import org.schabi.newpipe.fragments.list.kiosk.KioskFragment;
import org.schabi.newpipe.fragments.list.playlist.PlaylistFragment;
@ -432,8 +432,8 @@ public abstract class Tab {
}
@Override
public ChannelVideosFragment getFragment(final Context context) {
return new ChannelVideosFragment(channelServiceId, channelUrl, channelName);
public ChannelFragment getFragment(final Context context) {
return ChannelFragment.getInstance(channelServiceId, channelUrl, channelName);
}
@Override