Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance "Create thumbnails --> Render" to force thumbnail (re)creation. #1346

Open
jefferysmall opened this issue May 4, 2024 · 3 comments
Labels

Comments

@jefferysmall
Copy link

Setup (please complete the following information):

  • Xubuntu 22.04.4
  • Geeqie 1.7+git20220327-6d541232

Describe the bug
I've reported a number of other issues with thumbnails not updating properly when image files in a directory are renamed quickly in groups. I don't know if this will ever be addresses, so I want to be able to manually force the recreation of all thumbnails in a directory to get them in alignment with the images. I thought that:

Cache Maintenance --> Create thumbnails --> Render

would do this, but apparently if a thumbnail already exists, it just passes over the file. I need this command to be modified , or a parallel one created, that will force the thumbnails for all files in a specified directory to be recreated from scratch so that the mismatch thumbnails get synced with the actual file image.

Screenshots
Here's an example. I have a file with about a thousand symbolic links to files in other locations. These are pictures I load onto a card for display on a digital picture frame. When I add new links to this list I then run a custom command that randomizes all the link names so that the same link names end up pointing so some other random image file. The links are renamed quickly and Geeqie currently is incapable of recognizing that something has changes so that, in many cases, the old thumbnail associated with that link name is retained. (BTW, the same thing happens in folders containing the actual files which get renamed, so this isn't a symlink problem.) See attached screenshot. image_0746.jpg shows the sunset, but the thumbnail still shows the buffalo head that used to be assigned to this "image_0746.jpg" name.

geeqie_example

@caclark
Copy link
Collaborator

caclark commented May 7, 2024

If you press R to refresh, does the thumbnail get updated?
If you touch the file then refresh, is the thumbnail updated?

@caclark
Copy link
Collaborator

caclark commented Mar 6, 2025

The latest sources have an additional data output from --get-file-info.
The full path to the thumbnail is output.

That data could be used to delete the thumbnail, thus forcing it to be recreated.

The bad news is that the thumbnail is cached in RAM internally within Geeqie, and this is only refreshed when Geeqie is exited and restarted.

@jefferysmall
Copy link
Author

I just downloaded the latest 03-06-25 AppImage of Geeqie and I will do some testing and report back concerning various issues. However, two outstanding issue continue:

1: Although seeming to be more stable than previous releases, I still get geeqie to crash when exporting a JPG file from GIMP which is currently being displayed in a running session of geeqie. Also, the pop-up window reporting the crash still cannot be closed and the geeqie window still needs to be manually dismissed. Resolving this remains my #1 issue.

2: In the AppRun file the following line continues to fail and keeps geeqie from running:

this_dir="$(readlink -f "$(dirname "$0")")"

I have the current version of Geeqie installed in: /usr/local/bin/Geeqie-250306 and I launch it with a /usr/local/bin/geeqie symlink to the AppRun script. This script line sets this_dir to /usr/local/bin rather than /usr/local/bin/Geeqie-250306 and thus, the script fails. I've been replacing this line and setting this_dir to the absolute path after every update in order to allow things to work, but decided to research the problem further. I found an article that discussed this issue and offered a solution. replace the above line with the following:

SCRIPT_PATH="${BASH_SOURCE}"
while [ -L "${SCRIPT_PATH}" ]; do
    TARGET="$(readlink "${SCRIPT_PATH}")"
    if [[ "${TARGET}" == /* ]]; then
        SCRIPT_PATH="$TARGET"
    else
        SCRIPT_PATH="$(dirname "${SCRIPT_PATH}")/${TARGET}"
    fi
done

this_dir=$(dirname "${SCRIPT_PATH}")

This loops around and reduces the path to an absolute one, eliminating all symlinks. Here is the link to the article I discovered, and good thing, because this is bash-specific and I always work in ksh! :-)

https://www.baeldung.com/linux/bash-get-location-within-script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants