Support extension=* search, to filter extensionless files
This commit is contained in:
		
							parent
							
								
									5ee6062cad
								
							
						
					
					
						commit
						791172e073
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		|  | @ -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: | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue