Closed xplshn closed 2 months ago
Update: I can't reproduce the bug anymore, it only happened in the Wezterm window I had before. I will try to reproduce it again and leave instructions on how to do so
Happened again. It might have to do with the covers being too big, pressing C to disable the cover, then pressing B, then pressing C triggered the bug, but I didn't do that before to trigger it, and it had happened four times already when trying to play songs from that folder.
Quick note: Apparently the ASCII version of the cover doesn't resize the cover before printing it to the terminal? And the Normal version doesn't either, so sometimes the covers are not centered, even though the aspect ratios are set correctly. (I am probably mistaken)
I think I encountered this bug recently, though I might not be remembering it correctly. I remember while going through all of the FX keybindings, Kew suddenly quit itself. (By FX, I mean F2-F5)
Though it might be a different bug, as you are saying, it still is open, just not rendering anything on the screen. Unless it's a difference in how my terminal (Konsole) handled the issue than how yours did.
(Edited it since replying through the email notification messed up the formatting.)
Yeah, seems you found the same bug
Might be something wrong with the new code for displaying cover art.
Quick note: Apparently the ASCII version of the cover doesn't resize the cover before printing it to the terminal? And the Normal version doesn't either, so sometimes the covers are not centered, even though the aspect ratios are set correctly. (I am probably mistaken)
They are always resized to fit the window. But yes I notice in wezterm that if the window is small, it doesn't center. I have looked into this before and it's printing indentations before printing the image lines, but wezterm is simply ignoring them.
I actually have a solution for that now that works in more window sizes, but it still doesn't center it for very small windows.
I need a way to reproduce the bug in op. xplshn sent you an email.
I've tried with very large covers but no "luck".
Quick note: Apparently the ASCII version of the cover doesn't resize the cover before printing it to the terminal? And the Normal version doesn't either, so sometimes the covers are not centered, even though the aspect ratios are set correctly. (I am probably mistaken)
They are always resized to fit the window. But yes I notice in wezterm that if the window is small, it doesn't center. I have looked into this before and it's printing indentations before printing the image lines, but wezterm is simply ignoring them.
Then, its an issue with Wezterm?
Quick note: Apparently the ASCII version of the cover doesn't resize the cover before printing it to the terminal? And the Normal version doesn't either, so sometimes the covers are not centered, even though the aspect ratios are set correctly. (I am probably mistaken)
They are always resized to fit the window. But yes I notice in wezterm that if the window is small, it doesn't center. I have looked into this before and it's printing indentations before printing the image lines, but wezterm is simply ignoring them.
Then, its an issue with Wezterm?
Yes, I think so. The centering issue that is. You can see it sets the indentation on the last line of the cover (the black block on the last line). That is incorrect, not what the code says.
I can't seem to reproduce it still.
I tried to understand how you print the covers, but I am not sure I get it tho.
Shouldn't everything be calculated using the terminal's size? From indentation to logo to player and cover?
It is actually. It calculates the ideal image height given how many metatag lines there are and visualizerheight. and then send that height to: void printSquareBitmapCentered(FIBITMAP *bitmap, int baseHeight)
in chafafunc.c
Oh, okay. Then, I am out of ideas then.
You may as well just close this issue and open an issue in Wez/Wezterm
The only reason I think it may not be an issue only with Wezterm is because @Jaoheah says he has dealt with this thing before
If the ascii version is the same exact size as the Kitty protocol version... How come the indentation is not correct?
Hmmmmmmm, is there any way to use Sixel? Is Chafa using its "polite" mode? (looking at chafafunc it seems that, no, there is no possible way to use Sixels in a term which supports Kitty imgs, maybe some ENV variables/config options could be checked to allow for choosing behavior?)
The centering thing is to do with wezterm I think. Not the bug you reported.
Let's leave the issue open. If anyone finds a surefire way to get this bug to happen, please share it.
Closing this as we haven't been able to reproduce it. We also have another wezterm issue. I have opened an issue with them as well.
Info: Tracks are .flac, there are cover.jpg files in every sub folder, each folder is a different album from Artic Monkeys. At the root level of such folder there is another Cover.jpg.
Kew BEFORE pressing F4![2024-03-25-010542_1366x768_scrot](https://github.com/ravachol/kew/assets/114888778/7662a6d7-e8b4-43ee-b36f-40c15db1b03e)
Kew AFTER pressing F4![2024-03-25-010447_1366x768_scrot](https://github.com/ravachol/kew/assets/114888778/84999065-9242-480d-b2e3-0de224d4d9c2)
BEFORE F4 (strace) (Everything working correctly)
When I pressed F4 on a track which didn't present the problem
When I press F4 on a track which is problematic for Kew, it seems the problem is not present unless Kew runs inside of a pane in Wezterm?
AFTER F4, when the bug happens, trying to kill it with CTRL+C (strace)
Things which I tested: