FossifyOrg / Gallery

Browse your memories without any interruptions with this photo and video gallery
https://www.fossify.org
GNU General Public License v3.0
1.74k stars 59 forks source link

Nested folder view: some folders are incorrectly shown at top level #150

Open ErdlingProductions opened 8 months ago

ErdlingProductions commented 8 months ago

Checklist

Affected app version

1.1.1

Affected Android/Custom ROM version

Android 12 / Stock Firmware

Affected device model

Samsung Galaxy Note 10+ (Exynos)

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

  1. In the top bar, set to folder view
  2. Under settings/view, activate "Group direct subfolders"
  3. Navigate to the top level of the directory tree

Expected behavior

At the top level, either the single toplevel folder should be seen (storage/emulated/0/) or the contents thereof.

Actual behavior

This is my file structure, I highlighted the folders, that are shown at the top level of the gallery (4 + 1 total).

└── storage
    └── emulated
        └── 0
            ├── Android
            │   └── media
            │       └── com.whatsapp
            │           └── WhatsApp
            │               └── Media
            │                   └── WhatsApp Video - SHOWN AT TOP LEVEL
            ├── DCIM
            │   └── several_folders_with_photos_and_videos
            ├── Documents
            │   ├── folder_with_photos_and_videos - SHOWN AT TOP LEVEL
            │   └── folder_with_videos - SHOWN AT TOP LEVEL
            │       ├── videos_1
            │       └── videos_2
            │           └── 15-more-folders-with-videos
            ├── Download
            │   ├── folder_with_pictures_1
            │   └── folder_with_pictures_2
            └── Pictures
                └── Whatsapp - SHOWN AT TOP LEVEL

Additionally to the highlighted folders that are shown, the folder Internal with the path /storage/emulated/ is shown, which contains the folders that are in storage/emulated/0/, in this case DCIM and Download. Maybe the folder 0 is represented as Internal? The folders that are incorrectly shown at the top level do not reoccur in the Internal folder. Note that Documents is not shown in Internal even though only its sub folders are shown at the top level.

I am not sure what's going on here. In my understanding, the top level of the gallery should either be the folder storage/emulated/0 or the contents thereof.

I am happy to provide further information, please request if necessary.

Best regards!

Edit: I moved the two folders in Documents into DCIM. The folder without subfolders is now no longer visible in the top level. However the folder with subfolders is still visible at the top level.

Hargan2 commented 7 months ago

I think the issue I was about to report is related to this, hopefully the following information is useful: Folders that have no media, which contain a subfolder that also has no media, which contains another subfolder that does have media, results in only the subfolder(s) with media getting displayed at top level.

For example, on my S21 Ultra I have a folder tree that looks like this:

storage/emulated/0/photos/ ├─ Subfolder A/ │ ├─ Subfolder A1/ │ │ ├─ media │ ├─ Subfolder A2/ │ │ ├─ media │ ├─ Subfolder A3/ │ │ ├─ media

Subfolders A1, A2, and A3 all display at the top level, bypassing the "photos" and "Subfolder A" folders entirely, resulting in a disorganised mess where all albums are displayed instead of being neatly placed in one folder with subfolders. Placing all media in subfolder A does fix this, allowing for the "photos" album to show up with "subfolder A" as the direct subfolder but that defeats the point. It seems like the app only checks for literal direct subfolders, going exactly one folder deep, and if it doesn't find any media, it sort of skips until it does and displays the folders with media at the top level regardless of how far down the folder tree they are.

AdityaMishra135 commented 2 months ago

@Aga-C @naveensingh When this feature coming plz bro.

naveensingh commented 2 months ago

@AdityaMishra135 I'll check it soon...

Simon1511 commented 2 weeks ago

What really bugs me in addition to this issue is that the current opened group will always be shown as another folder inside the group.

For example:

I have /Internal Storage/Stuff/topfolder1/ and /topfolder2/ directory structure. All folders (Stuff, topfolder1, topfolder2) contain their own media files.

On the homescreen they'll all together be grouped as "Stuff", which is fine. When you then open the "Stuff" group it'll show another folder called "Stuff" alongside "topfolder1" and "topfolder2", instead of showing "Stuff" (group) -> "Stuff" (folder) -> topfolder1 and topfolder2.

I'm not sure but adding actual "folder nesting" would probably solve both issues.

AdityaMishra135 commented 1 week ago

@AdityaMishra135 I'll check it soon... Bro

AdityaMishra135 commented 5 days ago

@AdityaMishra135 I'll check it soon...

@naveensingh @Aga-C bro wen ?

naveensingh commented 5 days ago

@AdityaMishra135 haven't had the time yet.