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.
103 stars 37 forks source link

Can't get frigate recordings in card #52

Open dnestico opened 1 year ago

dnestico commented 1 year ago

It keeps loading forever to eventually tell me the media directory doesn't exist, when it does, recordings are stored under folders in the recordings folder created by frigate automatically.

It keeps complaining directory does not exist but under the media it literally does, as you can see in the screenshot the recordings folder does exist, it goes to multiple folders from each day but I have the recursive setting enabled so this shouldn't be an issue.

Screen Shot 2023-01-20 at 3 48 59 PM Screen Shot 2023-01-20 at 3 50 13 PM Screen Shot 2023-01-20 at 3 50 06 PM Screen Shot 2023-01-20 at 3 49 32 PM
type: custom:gallery-card
menu_alignment: Bottom
entities:
  - path: media-source://media_source/local/frigate/recordings/
    recursive: true
show_reload: true
TarheelGrad1998 commented 1 year ago

Do you have a lot of files in the folder? I definitely had this issue when using recursive folders and I've implemented some options in v3.4 that may help.

dnestico commented 1 year ago

Yea there's a lot of clips in the folder, which might be why.

And nice will update when I get it on HACS to see...

dnestico commented 1 year ago

Trying out the new update and I still just can't get it to work sadly.

Screen Shot 2023-03-21 at 3 01 08 PM

Folder:

Screen Shot 2023-03-21 at 3 03 35 PM Screen Shot 2023-03-21 at 3 03 51 PM Screen Shot 2023-03-21 at 3 04 14 PM
TarheelGrad1998 commented 1 year ago

Hrm, I don't know anything about Frigate. Does Frigate implement it's own Media Source? Maybe this is the issue.

In my case, I have manually added the folders, something like: media_dirs: Frigate: /mnt/media/Frigate ...and then the folders show up under Local Media, and would be accessed like this: media-source://media_source/Frigate/Clips

But in your case it's at the same level as Local Media. I do have DLNA folders there and tried to figure out how to make those work with the last version but had no luck. I think I'll have to rewrite the way I access media to have any chance of making that work.

Is there any way you could include those under media_dirs?

Sorry I'm trying to help but am limited by ignorance.

dnestico commented 1 year ago

So I don't need to do the "media_dirs" thing because it's technically already there. I guess the addon just can't read it for some reason.

The frigate folder is there under the media tab so Idk why it can't get the media, damn.

TarheelGrad1998 commented 1 year ago

I know it's there, but I'm trying to suggest a workaround that might make the card work for you. My suspicion is that the way the card is currently coded that it will only work for things under Local Media. I want to make it work for all media but that's going to take time and I'm not sure when/if I can get to it.

TarheelGrad1998 commented 1 year ago

I have started playing with frigate. You opened pandora's box, lol. I might set it up for myself, which will certainly make it easier to get the card working with it. I'm a ways from that, but I've started down that path.

Anyway, have you seen their card? It it far more developed than my card from the looks of it. Makes me feel inadequate. :)

dnestico commented 1 year ago

Haha welcome, Frigate is awesome once you get it working!

And yes I use their card but only for the live view because its not as good when switching between clips, snapshots and live view.

Thats why was tryna use your card to just display all the clips to be easy to watch.