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

Option to remove partially watched videos from the 'Whats new' feed. #9126

Closed
6 tasks done
killerrook opened this issue Oct 14, 2022 · 21 comments · Fixed by #9747
Closed
6 tasks done

Option to remove partially watched videos from the 'Whats new' feed. #9126

killerrook opened this issue Oct 14, 2022 · 21 comments · Fixed by #9747
Assignees
Labels
feature request Issue is related to a feature in the app feed Issue is related to the feed

Comments

@killerrook
Copy link

Checklist

  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I'm aware that this is a request for NewPipe itself and that requests for adding a new service need to be made at NewPipeExtractor.
  • I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise.
  • This issue contains only one feature request.
  • I have read and understood the contribution guidelines.

Feature description

Option to hide partially watched videos along with fully watched videos from the what's new feed of subscribed channels.

Why do you want this feature?

Sometimes you don't find some video worth watching or listening and you skip it in the current playing queue but it still remains in the what's new feed, which is somewhat annoying.

Additional information

No response

@killerrook killerrook added feature request Issue is related to a feature in the app needs triage Issue is not yet ready for PR authors to take up labels Oct 14, 2022
@opusforlife2 opusforlife2 added feed Issue is related to the feed and removed needs triage Issue is not yet ready for PR authors to take up labels Oct 14, 2022
@ishitak0712
Copy link

Hi there, I am a computing student from the Australian National University. Can I take on this issue? Thanks.

@SameenAhnaf
Copy link
Collaborator

@ishitak0712 Absolutely, yes. Just submit a PR whenever you are free.

@opusforlife2
Copy link
Collaborator

@ishitak0712 Could you give an idea of how you're thinking of doing this?

@SameenAhnaf
Copy link
Collaborator

SameenAhnaf commented Oct 22, 2022

Maybe, we could add an option Minimum Duration to Hide Watched Videos in Feed in Settings. The unit should be in seconds. This value cannot be less than 1.

Type * to hide only fully watched videos sub-note could be added too. What do you guys think?

@opusforlife2
Copy link
Collaborator

I was thinking of a simple menu with radio buttons, which lets a user choose between full, partial, or both.

@SameenAhnaf
Copy link
Collaborator

@opusforlife2 Videos should not be considered partially watched if only watched for 2 or 3 seconds. This value may vary from person to person as senior citizens may take a longer time to understand if a video is clicked mistakenly.

@opusforlife2
Copy link
Collaborator

The duration of partially watched videos is a bit tangential to this particular issue, though. To discuss letting users set custom durations for it, you can open a new issue.

@killerrook
Copy link
Author

10 seconds seems fine to me or even 5seconds is good enough to consider a video partially watched

@killerrook
Copy link
Author

Maybe consider adding an option to set the duration to avoid conflicts and frustration between user base. I believe the default should be set to 5 seconds. That would solve the issue entirely

@ishitak0712
Copy link

Yes that is what I was thinking too. Defining a threshold value over which the video is considered watched. 5 seconds seems good to me.

@Stypox
Copy link
Member

Stypox commented Oct 25, 2022

Currently this is the code that controls whether an item's "viewed" state is saved, and whether an item is considered as "finished".

  • if isValid returns false, then the progress is not saved to the database at all, in order to prevent saving progress about videos opened by accident
  • isFinished controls three things:
    • whether items are hidden from the feed in case the user chose to remove hidden files
    • whether watched playlist items are removed when the user requests to remove fully watched items
    • whether the player will resume a video from the last saved position when it is opened, or whether it will start from the beginning (starting from the end of the video is usually something unwanted)

Note that the isFinished implementation is not only in the StreamStateEntity file mentioned above, but also in an SQL query in FeedDAO.

So any code change related to isFinished should take into account all three use cases, and should behave the same in the three places. Providing a way for the user to choose thresholds for all three behaviors is a bad idea, both because there would be three times as many bugs, and also because this is so nitpicking that really few users would use it.

So what I'm proposing is to make the "hide watched" button a tristate button with this behavior:

  • "Show watched items" - show everything
  • "Hide fully watched items" - like current behavior, show only items where isFinished is false
  • "Hide watched items" - show only items that do not have a StreamStateEntity attached to them in the database (that is, only items that were never opened, or that were opened just for few moments and isValid returned false and therefore they were not saved to the database)

@Jared234
Copy link
Contributor

@Stypox @ishitak0712 Is this ticket still being worked on or can I give it a try?

@opusforlife2
Copy link
Collaborator

@Jared234 Go ahead.

@opusforlife2 opusforlife2 assigned Jared234 and unassigned ishitak0712 Jan 22, 2023
@Jared234
Copy link
Contributor

Jared234 commented Feb 2, 2023

Ok, so I have almost completed implementing this feature. I still have a couple of questions regarding the layout/design of this option. I implemented three different visibility options: Show All, Hide Fully Watched, Hide Watched.
I thought that a simple menu might be enough for this feature. Or do you want me to open an extra dialog for it?
This is how it looks like:
Screenshot_20230202-160831
Screenshot_20230202-160841
Screenshot_20230202-160854

If this is fine, I will open a PR.

@SameenAhnaf
Copy link
Collaborator

Short press on Hide Items icon could rather show checkboxes instead with options Upcoming, Fully Watched and Partially Watched.

@Jared234
Copy link
Contributor

Jared234 commented Feb 2, 2023

I don't think that checkboxes are necessary. Correct me if I am wrong, but I don't think there a use case where you e.g. only want to hide the partially watched and not the fully watched streams.
And what do you mean with the Upcoming option?

@SameenAhnaf
Copy link
Collaborator

There are two toggles: Hide Watched Items & Hide Future Items. There's no need for two separate icons.

Rather, merge them into a single one icon Hide Items. Short press on this icon could show three checkboxes in a drop-down menu. They are: Upcoming, Fully Watched and Partially Watched.

@Jared234
Copy link
Contributor

Jared234 commented Feb 3, 2023

Oh.. ok, then I agree that checkboxes make sense. Thanks!
I will implement these changes and then open a PR.

@opusforlife2
Copy link
Collaborator

What about a 3-state button that simply switches between these views?

@Jared234
Copy link
Contributor

Jared234 commented Feb 4, 2023

Hmm ... I prefer the solution approach of @SameenAhnaf. If we were to use a button with 3 states, would it even be possible to hide, for example, fully viewed and upcoming videos at the same time?
I have also completed the implementation of this solution and will now open the PR, so you can have a look at it. But of course we can discuss this further.

@SameenAhnaf
Copy link
Collaborator

@opusforlife2 I'd have suggested so if hiding only watched videos was useful. But there's an already an issue to hide Show Watched Items icon to avoid a bloated UI. See: #7090

I'm pretty sure that there will be issues for hiding downloaded and saved to playlist items. These new icons will make the UI even more crowded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app feed Issue is related to the feed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants