NewPipeExtractor icon indicating copy to clipboard operation
NewPipeExtractor copied to clipboard

Playlist in channels

Open fynngodau opened this issue 5 years ago • 10 comments

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.

fynngodau avatar Dec 22 '19 11:12 fynngodau

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?

Stypox avatar Jan 03 '20 08:01 Stypox

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.

XiangRongLin avatar Jan 17 '20 21:01 XiangRongLin

This is now possible in #279.

wb9688 avatar Mar 04 '20 13:03 wb9688

@wb9688 Please describe briefly, what you changed.

TobiGr avatar Mar 04 '20 13:03 TobiGr

@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.

wb9688 avatar Mar 04 '20 14:03 wb9688

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 avatar Apr 02 '21 06:04 fynngodau

@fynngodau I'd go with the third one, since it allows a channel to provide e.g. mixed playlists and videos

Stypox avatar Apr 02 '21 10:04 Stypox

@Stypox That works with the second one too if the subclass extends ChannelExtractor<InfoItem>.

fynngodau avatar Apr 02 '21 11:04 fynngodau

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.

micheal65536 avatar Apr 11 '21 17:04 micheal65536

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.

AudricV avatar May 29 '22 18:05 AudricV

I for one, would like to have playlists both for YouTube and for Bandcamp.

michaelblyons avatar May 03 '23 23:05 michaelblyons