NikitaIvanovV / ctpv

Image previews for lf file manager
https://www.nikitaivanov.com/man1/ctpv
MIT License
264 stars 23 forks source link

Audio previews not showing album image #96

Open hownioni opened 4 months ago

hownioni commented 4 months ago

When I try using the audio previews the metadata is okay, however the album image is not shown, apparently because of these errors:

At least one output file must be specified
Error: strconv.Atoi: parsing "(Here appears all the metadata of the file)"

what's weird is that the images are getting generated in ~/.cache/ctpv/

hownioni commented 4 months ago

After some bit of testing it seems the first error is produced by the if exists ffmpeg part of the audio.sh file the image is getting converted fine with fmmpeg. I would check more but I don't know enough C to check if something's going on in there

hownioni commented 4 months ago

I narrowed down the second error as being produced by kitty after passing an invalid string, which suggests that all of the contents of the x and y variables are being passed to kitty into the --place flag. Also I found that if you do this it first loads the ffmpeg metadata and after the cover is in the cache, it will alyways load it instead of the metadata, i don't know if this is the intended behaviour (I would assume it's showing the cover and the metadata at the same time). Also, if you change the order in which the audio function is given to the convert_and_show_image function like this, it will load the album cover in front of the metadata and the images will start piling up everytime you change file, they will be cleaned at random and then keep piling on