Fix some absurd capitalization as well as insta-crashing when config files are absent

This commit is contained in:
Sasha Koshka
2024-01-20 20:28:53 +00:00
parent 6e4c3fb452
commit cc6aad66c6
4 changed files with 34 additions and 32 deletions

View File

@@ -48,10 +48,12 @@ func OpenImage(path string, c chan string) {
var im *ueberzug.Image
if path != "stop" {
extractedImage := GetImagePath(path)
img2, _ := GetImg(extractedImage)
im, _ = ueberzug.NewImage(img2,
int(float32(ui.ImgX)*fw)+viper.GetInt("ADDITIONAL_PADDING_X"),
int(float32(ui.ImgY)*fh)+viper.GetInt("ADDITIONAL_PADDING_Y"))
img2, err := GetImg(extractedImage)
if err == nil {
im, _ = ueberzug.NewImage(img2,
int(float32(ui.ImgX)*fw)+viper.GetInt("ADDITIONAL_PADDING_X"),
int(float32(ui.ImgY)*fh)+viper.GetInt("ADDITIONAL_PADDING_Y"))
}
}
d := <-c
if im != nil {