Open greensum opened 3 years ago
Hi @greensum, thanks for this. Something to cope with multiple not-necessarily-related-folders would be good, and I had wondered about this before. It might be possible to change the SQL to allow a LIKE
style lookup or else make it cope with parsing a list so IN
would work. The client end would have to do something a bit cleverer as well
Be aware that setting followlinks to True can lead to infinite recursion if a link points to a parent directory of itself. walk() does not keep track of the directories it visited already.
So maybe this should be a config setting for users knowing what they do?
os.walk is also used in model.py def get_directory_list(self)
Something to cope with multiple not-necessarily-related-folders would be good
Some sort of a tagging system could be really useful here. So, define one or more text-based tags per folder and then build a playlist based on specified tag matches. I guess the hardest part would be in providing a mechanism to define the tags...
I wrote a patch.
model:
follow_links: False # default=False, By default, picframe will not walk down into symbolic links that
So you can configure, if picframe should follow symbolic links.
Have in mind, that the cache is not cleaned up, if you switch back to to follow_links=False
. So picframe will continue to show the already cached images in the symlink directories.
This, and that you can infinite loops let me decide to set the default to False
. It's more an expert flag. You should know what you are doing.
Commit: https://github.com/helgeerbe/picframe/commit/f4f7ee295e0754c3cf3dbae0a702af0b7b21805a
I’ve tested the change and it’s working for me. Thanks for putting in the change so promptly.
Sybolic links will will work since release 2021.09.22. But the rest might be an enhancement.
I know this is nog the right way, But can you contact me? I mean greensum ... I have a question for you.. contact@fredbaltus.nl . Sorry that i miss use this function
Hi,
So, I have my NAS mounted via SMB. I can access the files on '/mnt/nas/Photos'
There are many subdirectories under this Photos folder... 2010-01 2010-02 2010-03 and so forth...
I have the correct location in configuration.yaml as "/mnt/nas/Photos" but, when I run the run_start.py, it keeps sending me to the blue coffee cup screen, with no photos found.
How do I fix this?
Thank you,
UPDATE: Never mind, it works, there are over 100K photos, it took about 10mins start the slideshow. NICE!
Could be an access rights issue? On a pi3 I assume, that you run picframe as user pi
on a pi4 I assume that picframe is running as user root
?
First of all kudos to all those involved in this excellent project. It has basically all the features that I want and some that really wow me. I have all my pictures stored in my NAS and samba-mounted under
/mnt/photo
beneath which are subdirectories for each calendar year. Now if I want to display multiple years of pictures, currently there is no simple way to do it. Letting it see all the pictures and then use date filter is one possible way but I'll miss those pictures that are missing EXIF. I could set~/Pictures
as the picture directory in the configuration and then create several symlinks to point to those subdirectories under/mnt/photo
that I want to display. E.g.:~/Pictures/2019 -> /mnt/photo/2019
~/Pictures/2020 -> /mnt/photo/2020
~/Pictures/2021 -> /mnt/photo/2021
But I found it wouldn't work unless I add thefollowlinks=True
option to theos.walk
call in the__get_modified_folders
def inimage_cache.py
as follows:I know enhancing the selection subdirectory to support multiple ones is not straight forward, but in the meanwhile I think there is no reason that we don't want to follow links in the
os.walk
call, right? I'd appreciate very much if this could be changed to support my use case, and presumably many other people's as well. Thanks!