Background: My recently submitted App is shown without icon: https://f-droid.org/en/packages/de.wivewa.dialer/ although I’ve included one: https://codeberg.org/wivewa/wivewa-dialer-android/src/branch/main/app/src/main/play/en-US/listing/icon
So I looked how it works and arrived at https://gitlab.com/fdroid/fdroidserver/-/blob/255258f1c8855837ee1b03dda5b55f9f743ab54c/fdroidserver/update.py#L806. The images from the Apps are put into corresponding subdirectories of the (f-droid) repo. If the case from line 914 happens, then the icon is renamed to “icon.ext” (ext = the original file extension). In the case from line 912 (that applies in my case), this is not done. However, this itself is no problem because the icon is put into a folder called “icon” so that it should be clear what it is.
The issues start at line 1063. Notice the variable “screenshotdir” which is a misleading name because it has the value “icon” when processing the folder with the icon. The variable base (assigned in line 1075) is the filename without the file extension. In my case, it is not “icon” because the file was not renamed. However, screenshotdir has the value “icon” so that it would be possible to detect it. But line 1085 checks the variable base instead of screenshotdir so that it doesn’t process the icon as an icon because its filename is no icon. The next check is if the folder name is a screenshot folder name and then images are processed as screenshot.
The workaround that I will try is renaming the icon to “icon.png” with the next release. However, I think that it is better to fix the cause of this.
So If I understood the code correctly, then there are two issues:
- icons that are not called “icon” are ignored (if there is no automatic renaming)
- screenshots with the name “icon” are handled like an icon
And the cause is simply comparing the file name instead of the folder name. Could someone who knows the code confirm (and maybe change) this?