Gallery app loading images outside of image folders

REPRODUCIBILITY: 100%
OS VERSION: 4.4.0.72
HARDWARE: N/A
UI LANGUAGE: Polish
REGRESSION: N/A

DESCRIPTION:

It seems that the gallery app is loading images outside of the image folder. In my case it’s the music folder. This is making the gallery app hard to use since it’s showing both a photos and images which are fan art which is not something one would like to see.

PRECONDITIONS:

Have images in the Pictures folder and add some images into Music folder

STEPS TO REPRODUCE:

  1. Start gallery app
  2. notice it contains images from both, Pictures and Music directories

EXPECTED RESULT:

Only images/files from Picture folders are loaded

ACTUAL RESULT:

Images from Pictures and Music folders are loaded

MODIFICATIONS:

Only VolumeKeys

ADDITIONAL INFORMATION:

It would be good if the paths the gallery app is considering for image search, would be configurable in the Gallery App settings.
There’s also a conversation going here which suggests using third party app which gives bad look on SFOS.

Loading pictures outside the Pictures folder is most definitely a feature (Downloads, SD-card etc).
But excluding Music could be a good idea.

2 Likes

that’s why I explicitly mentioned the music folder. And a suggestion to add settings where we could select which folders to either include or exclude.

1 Like

It sounds more like a feature request, no?

How it is phrased now, and the making it configurable part - for sure.
The including album covers in gallery specifically i think is fair to call a bug.
I think it would benefit from separating out those issues.

1 Like

I have seen this behaviour too, but in my case they luckiely have old timestamps, so they appear on the bottom of the gallery.

@pherjung @attah I think it’s best to wait for @thigg as personally I don’t like duplicating issues and in this particular case a solution may actually implement the feature request which will at the same time, solve the bug.

What do you mean? @pherjung is also a bug coordinator.

1 Like

sorry, didn’t know that.

But it’s kind of inconsistent now that with Sailjail many other ‘built-in’ applications can’t access anything outside of folders in ~ dedicated to the corresponding file type. For example, it’s no longer possible to open in the Media player an .mp3 music file located directly in /home/defaultuser/, it has to be moved to ~/Music first. (of course, I could easily whitelist it in Sailjail config files, but I am talking about the standard situation).

I would very much like Gallery to be able to provide access to pictures outside of the ~/Pictures folder, but as a configurable option. In other words, ~/Pictures and ~/android_storage/Pictures by default (and of course the same for videos), and everything else optional, as a user configurable folder list.

No, in fact it is exactly the same with the other apps. All these apps have UserDirs permissions, i.e. all those standard directories - they are not limited to their respective primary directories.

Being more limited to the expected directories could be good, but i still think seeing Downloads and the SD card is very much how it should work.
However, Tracker is probably not very prepared to handle that different consumers of its information has different views of the filesystem.

If something as simple as this needs to be configurable, the implementation is very often wrong. Call me an Apple user, but there should be one good way to do it that is enough for everyone.

Well, I’d insist that there are still many inconsistencies. Like for example that while using the built-in web browser you are allowed to download a file to /home/defaultuser/ but then you cannot open it from there neither by tapping the notification about successful download nor via the browser’s Downloads menu option (which opens the “Transfers” page) as in both cases you get a “File not found” error message, even though the file is there. In order to be able to open a downloaded file using any of those methods you need to download it to ~/Downloads (or I guess the remaining subfolders too, just not directly to ~), from where opening it does work correctly from both the Transfers list and the browser’s “File successfully downloaded” notification.

Actually, maybe I should fill a bug report regarding it…

On a second thought, yes, you’re absolutely right. So maybe a configurable user’s blacklist instead…?

I’m fairly sure you can’t. It goes to that application’s view of ~, it does not actually end up there. By all means, bug-report the limited feedback on that (we are staring to get away from the topic).

Even worse for the user to have to faff with. Options are a bad, last-resort, option.

1 Like

sorry but if that’s the case, go use Apple OS. Many users are here because they don’t like “the apple way”. And I can argue with you as long as you want as there are multiple ways of doing something and all the solutions may be valid it’s just depends on the user which one he likes because many users use the phone in different ways. Same as with the hammer, that’s why we have multiple hammers with different heads and even these heads are different from both sides.

1 Like

Oh yes, you can :slight_smile: Why don’t you just give it a try? :wink:

First it shows a “Select location” dialog, where you can select between “Home directory” or numerical ID of your memory card (pretty incomprehensible for novice users). Selecting “Home directory” lists the contents of ~, where you can EITHER go deeper by selecting one of the subfolders OR just press the “Download to defaultuser” button which dowloads the file directly to ~. Which itself is fine, the only problem being that you then can’t access the file using any of the remaining options or from the notification because it gives you the misleading and untrue “File not found” error.

If I wanted a dumb, option-less device not giving me any choice but what someone else thought out would be the best for me, since 2007 I would have been an iPhone user.

I did try. It worked exactly as expected, the file not actually landing in ~ as viewed from anywhere else than the browser itself. Yes, including unjailed terminal, i.e. for real.

Unless you didn’t notice, the N9, and Sailfish are beautifully devoid of setting clutter. Just the way i like it.

Anyway, now i’m out of this thread (feel free to continue elsewhere) since we are now dangerously near off topic.

Well, indeed, you are right in that the file did not land in ~. Which doesn’t actually mean any good as it’s actually even worse. It does not land ANYWHERE as it’s simply nowhere to be found, despite the requester accepting /home/defaultuser/ as selection (and explicitly saying “Download to defaultuser”), notification about successful download being shown (that, when tapped, says “File not found” - which actually turns out to be true) and the Transfers page also listing a successful download (and again, only when tapped saying “File not found”). I actually suspect (judging by the time passing between pressing that “Download to defaultuser” button and the “File has been downloaded” notification) that the file actually does get downloaded to some web browser’s temporary folder, and then the browser fails to copy it to the selected destination (as it doesn’t have permission to store it in ~), which only wastes time and data traffic.

So in this shape it is a mess. Calling it inconsistent was actually an euphemism.

Please accept my right to respond. Now I’m done, too.

Hi @lolek. I had a look into this, but at the moment I’m either not experiencing the issue that you’re facing, or not fully understanding what the issue is.

Currently the Gallery defaults to showing four different image categories: Photos, Videos, Screenshots and Android storage.

The Photos category is configured to show images in user folders, excluding the Music folder, the Screenshots folder, or Android storage folder (or subfolders thereof). Anyone interested can check this by viewing the /usr/share/jolla-gallery/gallery.qml source code for the Gallery app, where we see the following:

filter: GalleryFilterIntersection {
    GalleryStartsWithFilter { property: "filePath"; value: StandardPaths.music; negated: true }
    GalleryStartsWithFilter { property: "filePath"; value: StandardPaths.pictures + "/Screenshots/"; negated: true }
    GalleryStartsWithFilter { property: "filePath"; value: androidStorage.path; negated: true }
}

In the same file, you can also see that the Screenshots category will only show images in the ~/Pictures/Screenshots folder. There’s also something similar for Android storage.

So, I’d expect the Gallery app not to show images from your Music folders.

I tested this on my own device running 4.4.0.72 by moving an image between the ~/Pictures folder and the ~/Music folder. The image appeared/disappeared from the gallery app as expected.

So if I’m understanding your report correctly, and the Gallery is showing image stored in your Music folder, then this would seem to be a bug.

To get to the bottom of this, one thing to double check would be the actual location of the image files that you’re not expecting to see (the fan art images you mention).

Would you mind please viewing one of the files in the Gallery app and selecting the “i” icon (top left of the image) and checking the file path and copying out the result here please?

1 Like

the path is: /run/media/defaultuser/78B7…/Music/Artists/Album…
so it seems the problems are files located on the microSD.

Thanks for checking. That makes more sense then as files on external storage are intentionally included. It’s not really reasonable to assume any particular structure for the folders on SD cards, say.

Do you have the SD card permanently mounted? If so, you could consider adding an exception to the /usr/share/jolla-gallery/gallery.qml file for the Music folder there, but it would be specific to your system and SD card.