Gallery is loading some video files when in gallery mode
Closed this issue · 12 comments
I have the following mix of files in a directory (MOV and HEIC):
When I launch swayimg on a directory mixed with videos and images, apparently swayimg is loading some video files along with all the other images even though they can't be shown on the gallery. They disappear only if you scroll down far enough to hide them from view.
This is unrelated to the problem above but I noticed the gallery thumbnails are not centered vertically. I don't know if this is by design though...
swayimg is loading some video files along with all the other images even though they can't be shown on the gallery
swayimg doesn't take file extension into account, so it shows the entire list of images unless one fails to load, then swayimg removes it from the list.
You can open only specified files by setting the all options to no
and then start the app with swayimg *.HEIC
.
thumbnails are not centered vertically
And by horizontal too, fixed.
P.S. Nice dogs, by the way =)
Ahh yes, horizontally too.
P.S. Nice dogs, by the way =)
Thank you :)
swayimg doesn't take file extension into account, so it shows the entire list of images unless one fails to load, then swayimg removes it from the list.
Would it be hard to implement a fix to only try to load actual image files? I think this is causing some unintended behavior the way it is right now with some thumbnail sizes. If I set the thumbnail size to 100, 200 or even 400 pixels everything works fine but if I set the thumbnails to 300 pixels I get some very weird behavior, it's like swayimg can't reload the gallery or something.
Please check the video below, it's a directory with .MOV
and .JPG
files:
https://drive.google.com/file/d/1vlCl9BePc7NyE5tBNxzmSHSIhd6MA_cF/view?usp=sharing
Would it be hard to implement a fix to only try to load actual image files?
Sorry, I don't know how to determine if a file actually contains an image without opening it.
If you sure that swayimg should open only specified files, then use something like swayimg *.HEIC
.
But If you have other ideas - welcome =)
unintended behavior the way it is right now with some thumbnail size
Do you use version 3.1? I tried different thumbnail sizes, but I can't reproduce the bug yet.
Do you use version 3.1?
I'm using the latest git version.
I tried different thumbnail sizes, but I can't reproduce the bug yet.
I think the bug has to do mostly with the mix of a certain quantity and type of files in the directory, thumbnail and screen resolution. It's not easy to reproduce.
It's not easy to reproduce.
That might have sounded like it's hard to reproduce from my end, it's not, it's actually 100% reproducible.
There is a difference in opening an image file directly by calling it with swayimg than just launching swayimg alone when in a directory. One works, the other one doesn't.
swayimg DSCF3505.JPG
results in the buggy behavior, on the other hand, just launching swayimg
without specifying a file, works correctly.
Please check the attached video link:
https://drive.google.com/file/d/1aEah8F5LcoaYjT2igDmaSfBmo_oukMy9/view?usp=sharing
There are only 12 pictures in that directory and swayimg is showing at least 24. It is duplicating them somehow....
I have another strange effect - swayimg just freezes at some combination of photos and window size.
I'll fix it.
I hope I fixed it =)
Could you try the latest version?
I hope I fixed it =) Could you try the latest version?
Hi Artem, it is fixed now, thank you. It still flashes the extra files at launch though. There is still a difference in how the gallery loads when just using swayimg
as opposed to using swayimg file.JPG
. So I'd say there should be a way to make it load correctly in both cases IMO.
Here's a quick video:
https://drive.google.com/file/d/17KdtXaPaCliIaajmv5ylD3tmyn9T6bNk/view?usp=sharing
there should be a way to make it load correctly in both cases
I don't think so. When you start swayimg without file name, it uses the first entry in the image list. So, swayimg
is equal to swayimg first_image_file.jpg
. The difference is in the non-image files in the list and its order.