-
-
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 hide YouTube Shorts from the feed #9049
Conversation
val streamItems = if (event is SuccessResultEvent || event is IdleEvent) | ||
feedDatabaseManager | ||
.getStreams(groupId, showPlayedItems, showFutureItems) | ||
.blockingGet(arrayListOf()) | ||
.filter { s -> showShorts || s.stream.duration > 0 } |
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.
Please explain this filter. Do shorts have an unknown duration (i.e. -1))?
What about other services? When there is an unknown duration for e.g. a media.ccc.de or PeerTube stream, they are removed by your filter, too. I suggest to only remove streams with the YouTube service id.
This is a non-viable solution, as it is planned in the future to extract shorts duration from channels using the accessibility data. Also, this would hide any video if the duration extraction fails in the future. Note: YouTube will roll out in the future dedicated shorts and live tabs, as you can see in this video. |
Thanks for the comments, both. I spent some more time on this, and struggled to find a way to elegantly implement this, so I raised this PR in I'd like to keep this PR open in the meantime to provide some context for the
|
It would be nice if this was a unified option to filter types of content: a filter content menu where you can tick on/off
|
@Douile This is the exact button that would need to be changed into a content filter menu. We shouldn't have the same functionality in different buttons/menus.
This raises an important point: the filter should be service-specific. So when you change the service from the hamburger menu, the filter menu should change accordingly. Also, it should remember the last set of selections for that service.
@chowder How about only feeds for now?
As mentioned above, the "hide premieres" button could be changed into a menu with check boxes. Probably, the last ticked item in the check box shouldn't be untick-able.
A filter icon? Is that available? Honestly, I would prefer the eye icon, which is unfortunately taken up by the "hide watched videos" button. But I don't know if we could find another icon for that button, either. Something like a play icon with a tick at the bottom. Or maybe the "watched videos" button could become just one more check box in the filter menu itself, though visually separated from the content-type check boxes. After all, the functionality is the same - hiding certain videos based on a condition. In that case, the eye icon could be used for this single unified drop-down. |
Question: should the filter be feed-specific as well? e.g. you might only want regular videos from a news channel, but livestreams from a gaming channel. And this preference is unlikely to change much. So someone who frequently switches between feeds would have to keep adjusting the filters, which seems inconvenient. |
fb798e1
to
787f87e
Compare
Kudos, SonarCloud Quality Gate passed! |
Thank you! |
9e71aec
to
3f1a7a0
Compare
Thanks for reviewing, @Stypox! Indeed NewPipeExtractor doesn't support the new channel tabs layout at the moment; as such, shorts are currently not being extracted, making this PR somewhat pointless (for now). I'll mark this as a draft until TeamNewPipe/NewPipeExtractor#951 makes further progress. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Closing due to no response from author |
What is it?
Description of the changes in your PR
Adds an options to hide YouTube Shorts from the feed.
Before/After Screenshots/Screen Record
Fixes the following issue(s)
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.
Due diligence