TarheelGrad1998 / gallery-card

A custom card for Home Assistant that will display images and/or videos from a folder in the style of a gallery.
97 stars 30 forks source link

NaNaNaNa Hey Hey-ey... Go-awaay #58

Closed GaryOkie closed 1 year ago

GaryOkie commented 1 year ago

Hey there UNC-THG,

Just updated to the new version (nice!) and am making the necessary format/caption changes. All OK, except I've not yet figured out what's causing this [NaN:aN] in the caption and how to get rid of it.

The file format in this example is 2023_03_14@23:01:47-sideyard.mp4

Here's the config and result (please excuse the spider's NSFWeb in the image :)... image

EDIT: i just noticed the note at the very bottom of date.js doc that the list of all recognized separation characters (-_:.,()/) does not include @. So replacing @ in the file format with one of these characters doesn't help. Do I have to change my file format to not use @ in the name to comply with this restriction?

TarheelGrad1998 commented 1 year ago

That part should be the duration of the files. I'm not sure why yours is not returning. I do get that sometimes on mine when it's an "in progress" recording but it seems it's doing that for all of your videos?

I put in an update 3.4.2 which should hide the caption if it does not parse. If that still doesn't work, I added the new option show_duration: false which will hide the duration.

GaryOkie commented 1 year ago

Thanks for this update! I will need turn off the duration caption since most (but not all) are showing the NaNa thing.

A few are showing 1 or 2 seconds duration which is way off - all the mp4's are 20-40 seconds long.

EDIT: Forgot to mention that in the previous Gallery-card version, the duration caption is an accurate time and never had NaNa..