-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add option to filter shorts #11650
Add option to filter shorts #11650
Conversation
empty commit (to allow internal review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you for opening the PR.
isSHortFOrmContent()
should be extracted correctly in slow / normal mode. THat is done in YoutubeStreamInfoItemExtractor.
YouTubeFeedIinfoItemExtractor is responsible for extracting isShortFormContent()
from the feed info when fast mode is enabled. However, the XML Atom Feed does not provide such info, it does not even provide the video's duration.
Please let me know if you are an ANU student for internal statistics and because I am writing my master thesis about open source contributions as part of learning computer science and computer science education at university. |
Thanks @TobiGr - I must've missed that one. And yes, I am a student at ANU. You might've noticed a few contributions from students recently, we are required to for an assignment :) . Thanks also for the information about how the extractors work, it is a lot to get my head around in such a short period of time. |
…th other "set" functions.
Quality Gate passedIssues Measures |
Hey, I just took a deeper dive into this PR and think that the main problem here is bad UX (again). We already have an option to filter the feed content. It can be found in the settings: settings > content > feed: fetch channel tabs. I suggest to rename the title of the setting to something like "Feed content" which is less technical. We are currently working on rewriting large chunks of NewPipe for better UI/UX and code quality. Having multiple places to adjust the feed is not good. We might want to unify this somehow (no need to do this in this PR). The filter itself is implemented here in FeedLoadManager and prevents the unwanted items to be fetched from the internet. However, they might have been fetched already if the user opened the shorts tab manually in the channel details. So in summary, I think we do not need the option you introduced because there is one already. But your functionality might be needed to filter items actually displayed in the feed. I just took a quick look and we might even need filters for the other content options as well. But I'd like to have some feedback from other maintainers on this whole issue first. |
I think this can be solved by just adding some text in the "Show the following streams" dialog, with a button to bring the user to the "Fetch channel tabs" setting. |
Closing as there has not been an answer yet and the current code is not ideal. As noted in my previous comment, I would support adding an informative text to the "Show the following streams" dialog instead. Also, now NewPipe is going through a refactor and is not accepting PRs for new features, as noted in the README. |
What is it?
Description of the changes in your PR
The changes I have made so far don't seem to be entirely effective - I suspect some details aren't being extracted properly, as some short form content still gets through the filter.
Before/After Screenshots/Screen Record
Before:
After:
I haven't shown a before / after for the effects of the filter, as it does not currently seem to work. A breakpoint on the filter I applied does get hit when loadStreams is called in FeedLoadManager - Part of the reason I wanted to open this PR is to get feedback, and to try and understand the functional flow of the program. I suspect part of the reason it isn't properly filtering, is values not being extracted properly. For example, the filter checks if the stream is short form content, however short form content is still displayed in the feed.
No changes were made to the extractor for this solution.
Fixes the following issue(s)
(does not entirely resolve the issue, but is related)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence