fupdec / mediaChips

Manage your videos, add any metadata to them and play them.
https://mediachips.app
GNU General Public License v3.0
150 stars 20 forks source link

Edit Date Filter seens to have some problems #146

Open pvtmann opened 1 year ago

pvtmann commented 1 year ago

Describe the bug There might have some problems with the Edit Date Filter in Videos, and it is not filtering correctly for "larger than" and "equal".

For an example, I have videos that were edited in 06/Jul/2022 8:07PM and Others in 01/Aug/2022 9:13 PM.

If i set the filter the filter to "equal" 06/Jul/2022, it will display nothing, as well that as setting 01/Aug/2022. Using "Not equal" display both of then. Also if I use the option, "Greater than" and set for 06/Jul/2022, it would be expected to display only the edited in August videos (Since is greater and not greater or equal), but it will display both the 06/Jul and 01/Aug. If set the filter to 07/Jul/2022, it will work correctly.

My guess, is that when we are selecting a date in the Filter Dialog, we only pick the Date, but we are actually picking Date and time. So when I select 06/Jul/2022, I actually selecting 06/Jul/2022 00:00:00.000, and that is why the equal filter compare with 06/Jul/2022 20:07:11.111 (just for example) it will not consider as equal, since the day is the same but the time is not. The opposite happens when using "greater than", Since the dates are equal, we are not expecting to show the edited in July videos, but they are shown. Since time is being considered, 06/Jul/2022 20:07PM is actually larger and not equal to 06/Jul/2022 00:00 (But this is not the expected by the user since only dates are picked). So I believe that setting the time to 00:00:00.000 (or whatever time is used in the filter reference), so the filter reference and object tested for filter, have always the same time value (only different dates) would fix the problem. This probably happens with other date filters, although I haven't tested it yet.

image image image image

Desktop (please complete the following information):

fupdec commented 1 year ago

Thanks for the detailed report. The application is now moving to a new database, and at the same time, all filters will be redesigned in accordance with the new query language (SQLite). I think that this problem will be solved.