Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caption formatting doesn't show properly or appears as NaN:NaN. #11

Closed
consandstuff opened this issue Apr 16, 2021 · 1 comment
Closed

Comments

@consandstuff
Copy link

I'm using this format for my video captions: %d/%m %H:%M but in the card it only has 1 digit for day, month, hours and minutes (instead of two), so if the file has this name 2021_04_15_09_57 the caption shows as: 5/4 9:7 [00:16], instead of 15/04 09:57.

This is my yalm config:

type: 'custom:gallery-card'
entities:
  - camera.front_cam
  - path: 'media-source://media_source/local/folder-name'
    recursive: false
maximum_files: '10'
file_name_format: '%YYY_%m_%d_%H_%M'
caption_format: '%d/%m %H:%M '
menu_alignment: Responsive

image

Also, if the filename has the hour as 1 digit (9_57 instead of 09_57) the card shows the caption as NaN:NaN.

The rest of the card works great though! really happy with your work.

@TarheelGrad1998
Copy link
Owner

I think this is fixed with 3.1. I found that some characters (e.g. space) where getting URL encoded (e.g. %20) which threw off the calculation. Try that update and let me know if it's still broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants