Gallery icon indicating copy to clipboard operation
Gallery copied to clipboard

Some videos listed in 'Folder-view' but missing in 'Show all folders content'

Open seniordevel opened this issue 11 months ago • 13 comments

Checklist

  • [x] I can reproduce the bug with the latest version given here.
  • [x] I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • [x] I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • [x] I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • [x] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [x] This issue contains only one bug.
  • [x] I have read and understood the contribution guidelines.

Affected app version

1.2.1

Affected Android/Custom ROM version

Android 11

Affected device model

Gigaset GS4

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

  1. Download this video file from https://limewire.com/d/3eb7965f-3738-4093-88b2-d59455f49912#84AWx8LfAxcPnae8BBcFvYj83Og9bxfxGFLT4v_JT74 It is one of my example video files to demonstrate the bug (see note at the bottom)
  2. Open Gallery, see the video listed in 'folder view'
  3. Switch from 'Folder view' to 'Show all folders content' Result: Either this video video is not shown at all -OR- this video is shown for ~1 second and then vanishes magically.

Note: The mentioned video was originally downloaded from TikTok using the following internet service: ssstik.io. It just shows different monkeys and their natural voices. You do not need to worry about this video content.

Expected behavior

Videos listed in 'Folder view' should be listed in 'Show all folders content' too.

Actual behavior

Some videos listed in 'Folder view' but not in 'Show all folders content' view.

Screenshots/Screen recordings

No response

Additional information

This issue might be related to 'Thumbnails for vp9.mp4 wont render' #226 But I see some differences.

What I tried to fix the issue:

  1. clear the Gallery cache and then..
  2. restart the system
  3. download new copy of the video file (and delete the previous one) Result: Issue persists

Additionally I checked the file type with TRID file analyzer: 50.0% (.MOV/QT) QuickTime Movie (ISO) (3012/3) 33.3% (.MP4) ISO base media container (2004/2) 16.6% (.ABR) Adobe PhotoShop Brush (1002/3)

seniordevel avatar Feb 02 '25 21:02 seniordevel

I can reproduce this on a Samsung, Xiaomi and a Vivo phone but not on some other devices.

File location doesn't seem to make a difference.

naveensingh avatar Feb 03 '25 05:02 naveensingh

I can't reproduce it on OnePlus 9 Pro (Android 14) and Xiaomi Redmi 7A (Android 10).

Aga-C avatar Feb 03 '25 07:02 Aga-C

However, meanwhile I found the video file in 'Show all folders content' view: Listed at an earlier date: 01/26/2025

But this earlier date makes no sense since file 'creation time' and 'modification time' are: Su, 02 February 2025 21:58:12

seniordevel avatar Feb 03 '25 12:02 seniordevel

If you're sorting by Date taken, then it's working properly because in this file metadata there's:

Create Date                     : 2025:01:26 15:46:51
Track Create Date               : 2025:01:26 15:46:51
Media Create Date               : 2025:01:26 15:46:51
Creation Time                   : 2025:01:26 15:46:51Z

You can just sort by modification date.

Aga-C avatar Feb 03 '25 13:02 Aga-C

As always I sort by modification date (not by date taken). I just rechecked.

It seems that sorting by modification date uses meta data, not file properties as expected. But I agree, you can do it that way (using exif only).

seniordevel avatar Feb 03 '25 14:02 seniordevel

Please allow one question at this place and this context: What happens if I delete exif data, how will your app sort by 'last modified' then? (I just tried with an image file, but it still seems to use the exif date, which now should be deleted)

seniordevel avatar Feb 03 '25 15:02 seniordevel

What happens if I delete exif data, how will your app sort by 'last modified' then?

It will use the new "last modified" value returned by File.lastModified(). When date taken is not available, last modified is used.

I just tried with an image file, but it still seems to use the exif date, which now should be deleted

To properly clear the cache, you'll have to do something like this:

  • move the file to some other device (e.g. computer) and ensure the file no longer exists on your device
  • remove metadata on the other device
  • copy the image without metadata back to your device.

naveensingh avatar Feb 03 '25 15:02 naveensingh

@naveensingh

Just a suggestion (does not necessarily require a answer):

Avoid (sorting) operations after content is displayed. I usually use an array or similar to do sorting operations before results are displayed graphically. Further advantage: It is faster. I am not sure, but this should be possible with Kotlin language too.

I posted this issue because I was irritated, for a good reason: I have seen the video thumbnail several times being displayed in the "Today" listing for about a second, then it magically disappeared because your algorithm moved it to another date. I think users should never see any kind of 'live sorting'.

Nevertheless, many thanks for all your coding work !

seniordevel avatar Feb 03 '25 21:02 seniordevel

Reopening because this glitch should be fixed.

naveensingh avatar Feb 04 '25 05:02 naveensingh

~There's indeed a bug in the sorting/grouping process.~

Create Date                     : 2025:01:26 15:46:51

~This date should be used only when sorting by date taken/created but it's also being used when sorting by last-modified/date-added which is invalid. The app can access the proper last modified value as per the properties dialog:~

Image

Edit: Files are grouped according to user preference.

naveensingh avatar Feb 04 '25 05:02 naveensingh

@seniordevel What do you have set in Group by?

Aga-C avatar Feb 04 '25 07:02 Aga-C

I see the issue now. The confusion is about grouping vs sorting. It works fine once I choose last modified in group by dialog as well as sort by dialog.

The "glitch" should be fixed, the group by and sort by features could be more user friendly.

naveensingh avatar Feb 04 '25 07:02 naveensingh

It works fine once I choose last modified in group by dialogue as well as sort by dialogue.

Yes this fixes the 'issue'. Works as expected now.

@Aga-C Indeed, the groupBy dialogue was set to 'date taken'. Setting it to 'last modified' fixes the confusion.

seniordevel avatar Feb 04 '25 09:02 seniordevel