whyboris / Video-Hub-App

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

Add Year slider to Filters & Sorting Options #650

Open misterb667 opened 3 years ago

misterb667 commented 3 years ago

enhancement request:

add a year slider (similar to Duration, Size, Resolution, Star sliders) to Filters & Sorting Options.

It would be great to have a slider so that you can select a range of years to filter on (e.g. 2015 to 2017). the slider could start at the minimum year of your hub and end at the max year.

whyboris commented 3 years ago

I'm thrilled to hear someone is using the year feature 😅

Adding a slider for it is doable, I'll be happy to accept a PR (code contribution) for this feature. In the codebase there's already a pattern for adding sliders, and it wouldn't be too complicated.

I'm currently a bit busy for the next few months. Afterwards I'll want to do some work on face recognition. I'll keep this suggestion open for future development 🤝

ps - until this feature appears, you can sort by year - if you enable it in the "Search settings" -> "Sorting options in the dropdown" section 👍

litelime commented 3 years ago

@whyboris I am working on this one, but getting some errors when trying to build or start that I cant figure out, maybe you can take a look when you get a chance. I tried updating to most recent node js and installing. Im not familiar with typescript so it might be something obvious im missing.

Generating browser application bundles (phase: building)...node/main-ipc.ts:73:15 - error TS2339: Property 'openItem' does not exist on type 'Shell'. 73 shell.openItem(path.normalize(fullFilePath)); // normalize because on windows, the path sometimes is mixing \ and /

node/main-ipc.ts:156:17 - error TS2339: Property 'openItem' does not exist on type 'Shell'.
156           shell.openItem(savePath);

node_modules/electron/electron.d.ts:6642:21 - error TS2694: Namespace 'NodeJS' has no exported member 'Require'. 6642 require: NodeJS.Require;

whyboris commented 3 years ago

Thank you for working on this 😁 Try merging in #648 (I'll be putting it on the main branch soon) - this has the latest Electron and fixes the openItem API change: https://github.com/whyboris/Video-Hub-App/pull/648/files#diff-0b4a13d876020b09b600e6a8fb04f755f6d531ecb9c9a7335510da545bbe9d7bR73

litelime commented 3 years ago

@whyboris quick question on desired behavior for this. The year is a bit unique in that people will have to add the year to their videos, they might have a huge amount of videos that have no value for this attribute. The way I have it currently is that the min value on the slider is the lowest year they have in their library with max being the highest. But this means that turning on this year filter immediately filters to only the videos that have set a value for the year. Any thoughts on that?

whyboris commented 3 years ago

I'm unsure how the app should behave 😅 It might make sense to not show any videos that are not already tagged 🤔 but I'm open to any other alternative you propose.

One benefit of hiding videos - is that I think that's the easiest behavior from the code perspective (right?), and also it seems easy to grasp from the user's perspective 🤔

I'm open to suggestions for anything different 🤝

litelime commented 3 years ago

Yeah I like the hiding approach because it limits the slider to only the available years. Rather than sliding from "Year 0" all the way to 2021 😅