Support extension=* search, to filter extensionless files

This commit is contained in:
voussoir 2017-03-23 15:49:55 -07:00
parent 5ee6062cad
commit 791172e073

View file

@ -797,7 +797,14 @@ class PDBPhotoMixin:
for fetch in generator:
photo = objects.Photo(self, fetch)
if extension and photo.extension not in extension:
ext_okay = (
not extension or
(
('*' in extension and photo.extension) or
photo.extension in extension
)
)
if not ext_okay:
#print('Failed extension')
continue
@ -805,7 +812,7 @@ class PDBPhotoMixin:
extension_not and
(
('*' in extension_not and photo.extension) or
(photo.extension in extension_not)
photo.extension in extension_not
)
)
if ext_fail: