whyboris / Video-Hub-App

Official repository for Video Hub App
https://videohubapp.com
MIT License
586 stars 176 forks source link

Make "Recent" tab (bottom tray) always show recently played #822

Open whyboris opened 1 year ago

whyboris commented 1 year ago

This should be easy using the lastPlayed property 🤔

Rather than replace the functionality, perhaps load the top-5 according to lastPlayed property upon opening the hub 🤔 and continue using whatever code already exists.

This may be better than replacing the code with the filter that would have to re-run (re-compute) every time 🤷‍♂️

Swish78 commented 11 months ago

Hello,

I would like to take on this issue and contribute to its resolution. I see the potential to optimize the code without replacing it entirely. My proposal is to load the top-5 items based on the "lastPlayed" property upon opening the hub. This would enhance performance and prevent the need for re-computation on each load.

Here's my plan for resolving this issue:

  1. Retrieve the data containing the "lastPlayed" property.
  2. Sort the data in descending order by the "lastPlayed" property.
  3. Select the top 5 items based on the sorted data.
  4. Display these items in the hub interface.

I'd greatly appreciate some guidance on the specific codebase and any additional preferences you may have. Please consider assigning this issue to me, and I'll diligently work on implementing this improvement.