NewPipeExtractor
NewPipeExtractor copied to clipboard
Playlist in channels
I am currently working on bandcamp support in my fork. Even though it was difficult to understand at first, I feel like I now know what I'm doing.
I noticed that ChannelExtractor.getInitialPage()
must return an InfoItemsPage
of type <StreamInfoItem>
. This means that channels can't contain playlist items, unlike search results, where the return type is InfoItemsPage<InfoItem>
.
For bandcamp support, this is inconvenient, as streams (tracks) don't appear on their channel (artist's profile) themselves when they are part of a playlist (an album).
That's why I'd like to ask this to be changed so that channels can also contain playlists.
I think it would be ok to change this, but complications would arise when showing playlists in channels in NewPipe. For example, how could we implement "play all in background" when the list contains playlists?
Any news on this? I have found myself with a similar problem when trying to extract the playlists from playlist-tab in YouTube channels. The same problem would arise when doing it for the channels-tab.
This is now possible in #279.
@wb9688 Please describe briefly, what you changed.
@TobiGr: InfoItemsSearchCollector is now called MixedInfoItemsCollector. ChannelExtractor now extends Extractor instead of ListExtractor<StreamInfoItem>, and has a function that returns a List <ChannelTabExtractor>. A ChannelTabExtractor is a ListExtractor<InfoItem> and uses the MixedInfoItemsCollector, thus it could return e.g. both streams and playlists in a single tab.
Too bad #279 didn't get merged. Maybe a more simple change would be to change ChannelExtractor
from
public abstract class ChannelExtractor extends ListExtractor<StreamInfoItem>
to
public abstract class ChannelExtractor<R extends InfoItem> extends ListExtractor<R>
or to
public abstract class ChannelExtractor extends ListExtractor<InfoItem>
What do you think? Could this change be done without introducing new incompatibilities?
@fynngodau I'd go with the third one, since it allows a channel to provide e.g. mixed playlists and videos
@Stypox That works with the second one too if the subclass extends ChannelExtractor<InfoItem>
.
What about simply adding another tab in the NewPipe UI (like how YouTube does it)? Then "play all" only needs to apply to the list of individual videos/content items and not to the playlists/albums tab. Putting everything in one list only really makes sense for Bandcamp, and makes no sense at all for YouTube.
What about simply adding another tab in the NewPipe UI (like how YouTube does it)?
That's why this issue is opened. Also, we are talking here about the extractor implementation of this feature, and not about the app one.
I for one, would like to have playlists both for YouTube and for Bandcamp.