Closed jeffalperin closed 3 years ago
Hi Jeff, that's interesting. I am also using SyncThing but no .stfolder
is being shown in my Home Assistant dropdown list, only the folders under /Pictures
. Anything different from the default settings that you may have done?
@sapnho, I have a different root photos directory /home/pi/4kpix
, but I wouldn't think that cause this behavior. I manually deleted the .stfolder
from the dropdown list (from the Helpers section of Home Assistant) and then manually re-executed the picframe_directory_get
automation and .stfolder was once again added to the drop-down list.
If you do an ls -all
inside /Pictures
, do you have an .stfolder
?
If you do an
ls -all
inside/Pictures
, do you have an.stfolder
?
No, I don't.
Hmmm. From: SyncThing FAQ at https://docs.syncthing.net/users/faq.html
How do I serve a folder from a read only filesystem?
Syncthing requires a “folder marker” to indicate that the folder is present and healthy. By default this is a directory called .stfolder that is created by Syncthing when the folder is added. If this folder can’t be created (you are serving files from a CD or something) you can instead set the advanced config Marker Name to the name of some file or folder that you know will always exist in the folder. I really hate the .stfolder directory, can I remove it?
See the previous question.
I really hate the .stfolder directory, can I remove it?
I think you can't.
However: My structure is that I have a folder below /Pictures which is called Photos. Inside Photos is the .stfolder.
I guess that's why it doesn't show in Home Assistant.
And to add, my synchronization is on /Pictures/Photos.
Hi, actual all folders are used. To be honest, haven't thought about hidden folders. But it should be easy to exclude them. Don't know what best how to deal with subfolders. Actual only first level subfolders are send do homeassistant (But all images below this subfolder structure are displayed). But there might be user who have a deep nested folder structure. Although I don't know how to handle that in a selection list.
E. G.
At the end this could result in a selection like this:
Could become long and nasty for huge structures.
@sapnho Only first level subfolders are displayed in home assisstant.
It looks like the folder collection you're working with is coming from model.get_directory_list()
. There, it's using the standard os.walk()
method to build up the list. While there's no option to skip hidden files/folders in os.walk()
, it be trivial to not include them at that stage.
@paddywwoof / @helgeerbe - is there any legitimate reason we'd ever want to include hidden folders here (I assume not), or can we simply eliminate them in get_directory_list()
?
@jgodfrey no, we should delete them
We already filter any hidden image files or ones with .AppleDouble
in the path so maybe we can generalise it to any file or folder starting with .
I'm using SyncThing to synchronize image folders to my picture frame. SyncThing creates an empty subfolder named
.stfolder
in the root image folder used by picframe. This subfolder is shown in Home Assistant's drop-down list of possible image directories. Is it possible to exclude this (and any other hidden directories)?