Skip to content

Commit 46f0c18

Browse files
fix some photos load
1 parent 84b163c commit 46f0c18

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
109 Bytes
Binary file not shown.

gallery/loadFiles.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ def getFirstFile(self, files, first_file = True, search = None):
2121
continue
2222
files_in_dir = os.listdir(self.path_to_scan + '/' + file)
2323
if(first_file == True):
24-
files_in_dir = files_in_dir[0]
24+
for file_first in files_in_dir:
25+
if '.init' in file_first or os.path.isdir(self.path_to_scan + '/' + file + '/' +file_first) == True:
26+
continue
27+
files_in_dir = file_first
28+
break
29+
print(files_in_dir)
2530
files_content.append({
2631
'dir_name': file,
2732
'dir_name_encoded': file,
@@ -35,7 +40,7 @@ def getPhotosFiles(self, dir_name):
3540
self.path_to_scan = self.path_to_scan + '/' + dir_name
3641
for file in self.scanDirFunc():
3742
file_path = self.path_to_scan + '/' + file
38-
if(os.path.isdir(file_path) == True):
43+
if os.path.isdir(file_path) == True or '.ini' in file:
3944
continue
4045
files_content.append(file_path)
4146
return files_content

0 commit comments

Comments
 (0)