Skip to content

Commit

Permalink
Merge pull request #230 from helgeerbe/Skip-hidden-folders-when-loadi…
Browse files Browse the repository at this point in the history
…ng-images

Ignore hidden folders when loading images
  • Loading branch information
jgodfrey authored Jan 15, 2022
2 parents dcf4b0f + f4bdb4d commit 00f3345
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions picframe/image_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def __get_modified_folders(self):
out_of_date_folders = []
sql_select = "SELECT * FROM folder WHERE name = ?"
for dir in [d[0] for d in os.walk(self.__picture_dir, followlinks=self.__follow_links)]:
if os.path.basename(dir)[0] == '.': continue # ignore hidden folders
mod_tm = int(os.stat(dir).st_mtime)
found = self.__db.execute(sql_select, (dir,)).fetchone()
if not found or found['last_modified'] < mod_tm or found['missing'] == 1:
Expand Down

0 comments on commit 00f3345

Please sign in to comment.