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

Any way to make it ignore certain files? #85

Open
thepenguinthatwants opened this issue May 10, 2020 · 1 comment
Open

Any way to make it ignore certain files? #85

thepenguinthatwants opened this issue May 10, 2020 · 1 comment

Comments

@thepenguinthatwants
Copy link

Hi!

I usually have CR2 (RAW image) files in same folder than the JPG. Any way to make vimiv to ignore those files? As it seems vimiv cant render them.

@karlch
Copy link
Owner

karlch commented May 10, 2020

Unfortunately this is not possible and I would consider this a bug in the fileactions.is_image method, it should only return True if the image can also be opened. I will try to find a fix for this in general.

EDIT:
Seems like the underlying gdk method: GdkPixbuf.Pixbuf.get_file_info thinks that cr2 images are tiff and thus supported. Not sure how to work around this then. You can probably add a hacky patch to this method though, something along:

def is_image(filename):
    """Check whether a file is an image.

    Args:
        filename: Name of file to check.
    """
    if os.path.splitext(filename)[1].lower() in (".cr2", ):
        return False
    try:
        ...

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

No branches or pull requests

2 participants