Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve channel tabs code #1092

Merged
merged 7 commits into from
Aug 6, 2023
Merged

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Aug 6, 2023

I implemented my suggestions from #1082 here, read the commit subjects for specific info. This completes the channel tabs PR, but can be merged with less priority.

I basically rewrote from scratch the channel tab tests, as you can simply inherit DefaultListExtractorTest and let the default implementation do the rest. All tests still pass. Furthermore, I split the age restricted channel tabs test into two tests, although this implies the common channel page is fetched twice.

We still need to decide whether we want to rename ReadyChannelTabListLinkHandler to something else. tldr it's a class that is used as a temporary ListLinkHandler which can only be instantiated internally (while other link handlers are instantiatable by anyone) in the extractor for specific purposes, e.g. to prevent additional fetches of data in channel tab extractors when such data has already been extracted in the channel extractor.

Let me know if e34739e is ok in your opinion. There is now a "Raw use of parameterized class 'InfoItemsPage'" warning, but it can be ignored since the type missing would be <InfoItem>, and StreamInfoItem extends InfoItem.

@Stypox Stypox requested a review from AudricV August 6, 2023 12:08
@AudricV
Copy link
Member

AudricV commented Aug 6, 2023

Let me know if e34739e is ok in your opinion. There is now a "Raw use of parameterized class 'InfoItemsPage'" warning, but it can be ignored since the type missing would be <InfoItem>, and StreamInfoItem extends InfoItem.

Shouldn't you apply the same changes for next pages too?

@Stypox Stypox force-pushed the channel-tabs-improvements branch from c8c5ff5 to 07bb752 Compare August 6, 2023 16:15
@Stypox
Copy link
Member Author

Stypox commented Aug 6, 2023

Shouldn't you apply the same changes for next pages too?

Right, my bad. Fixed.

@AudricV
Copy link
Member

AudricV commented Aug 6, 2023

Right, my bad. Fixed.

The commit message isn't though.

Stypox added 4 commits August 6, 2023 21:13
Note that this introduces a "Raw use of parameterized class 'InfoItemsPage'" warning, but it can be ignored since the type missing would be <InfoItem>, and StreamInfoItem extends InfoItem
@Stypox Stypox force-pushed the channel-tabs-improvements branch from 07bb752 to 6d22271 Compare August 6, 2023 19:15
@Stypox
Copy link
Member Author

Stypox commented Aug 6, 2023

The commit message isn't though.

Fixed

Copy link
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for these improvements and for this one line saving!

@AudricV AudricV changed the title Channel tabs code improvements Improve channel tabs code Aug 6, 2023
@AudricV AudricV added enhancement New feature or request codequality Improvements to the codebase to improve the code quality labels Aug 6, 2023
@Stypox Stypox merged commit 7936987 into TeamNewPipe:dev Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codequality Improvements to the codebase to improve the code quality enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants