lbry-desktop icon indicating copy to clipboard operation
lbry-desktop copied to clipboard

Add filter for unwatched content

Open dgarrett01 opened this issue 2 years ago • 5 comments

Since we now have a progress bar that indicates if we have viewed specific content, I think it would be great if, under the "Sort By" drop-down, you could select "Not Yet Viewed," or something like that. It could pull data from the "file-thumbnail__viewed-bar-progress" element and only show content that hasn't been viewed to 100%.

dgarrett01 avatar Jul 09 '22 10:07 dgarrett01

I'm very slowly working on this...

image

I have the menu item, but beyond that, I have no idea where to go with this. I don't know how the actions are completed or even where to go in the code to implement a filter like this. Any help would be greatly appreciated. Should I be looking in redux, or would this code be in the LBRY desktop app code?

dgarrett01 avatar Jul 09 '22 13:07 dgarrett01

UI Implementation

In my opinion, the "sort by" menu is an unintuitive place for this, and it makes it impossible to both sort oldest first and filter by unwatched. A better place would be just a toggle/button with some eye-icon or something which would toggle the filtering.
Another related visual update would be to have an indicator on the claim listing which shows if the content has been seen before.

"Backend" implementation

I haven't really touched the lbry-desktop codebase before, but thinking of ways this could be implemented, I came up with two:

  1. Have every claim have a local boolean tag for seen (or some similar name), false by default, true it if has been viewed.
  2. Store all seen content in a single place by claim_id or some other unique identifier. This could also act as a user accessible history of all consumed content.

Since lbry-desktop already stores the timestamp where the watching of a video ended, it could act as an indicator of a video being viewed, but I don't know if it works for any other kind of content.

I am in favor of option 1. and think it could be implemented in a manner similar to the watch-timestamp.

Another thing to consider is when is a piece of content considered seen, does just clicking on it once count as that or do you have to spend some time looking at it.

xynydev avatar Jul 09 '22 17:07 xynydev

I was considering just pulling the data from the progress bar. Maybe 90% or greater would be considered "watched."

I agree that a checkbox or something else would probably be more reasonable, so as to be able to sort by oldest or newest, as well.

dgarrett01 avatar Jul 09 '22 17:07 dgarrett01

Would be nice to have a setting in settings, along with a Clear Watch Progress button (copy the Clear Cache button at the bottom.)

jessopb avatar Nov 25 '22 17:11 jessopb

It looks like in redux store: content/positions stores by claimId, and content/history stores array of objects with uri and lastViewed time. Might reasonably include both.

jessopb avatar Nov 25 '22 18:11 jessopb