Minor commentary and cleanup
This commit is contained in:
		
							parent
							
								
									eafb7fcffe
								
							
						
					
					
						commit
						4928095abb
					
				
					 3 changed files with 23 additions and 6 deletions
				
			
		|  | @ -18,9 +18,10 @@ Documentation is still a work in progress. In general, I use: | ||||||
| - Improve the "tags on this page" list. Maybe add separate buttons for must/may/forbid on each. | - Improve the "tags on this page" list. Maybe add separate buttons for must/may/forbid on each. | ||||||
| - Some way for the database to re-identify a file that was moved / renamed (lost & found). Maybe file hash of the first few mb is good enough. | - Some way for the database to re-identify a file that was moved / renamed (lost & found). Maybe file hash of the first few mb is good enough. | ||||||
| - Debate whether the `UserMixin.login` method should accept usernames or I should standardize the usage of IDs only internally. | - Debate whether the `UserMixin.login` method should accept usernames or I should standardize the usage of IDs only internally. | ||||||
| - Album size is calculated every time you refresh the page. For large albums this is very slow. Consider caching? Or saving to db? | - Ability to access user page and user photos by user's ID, not just username. | ||||||
|  | - Should album size be cached on disk? | ||||||
| - Organize the tag exporter functions better. | - Organize the tag exporter functions better. | ||||||
| - Replace columns like area, ratio, bitrate by using [expression indices](https://sqlite.org/expridx.html) — `width * height` etc. | - Replace columns like area, ratio, bitrate by using expression indices or views (`width * height` etc). | ||||||
| - Add some way to support large image albums without flooding the search results. Considering a "hidden" property so that a handful of representative images can appear in the search results, and the rest can be found on the actual Album page. | - Add some way to support large image albums without flooding the search results. Considering a "hidden" property so that a handful of representative images can appear in the search results, and the rest can be found on the actual Album page. | ||||||
| 
 | 
 | ||||||
| ### Changelog | ### Changelog | ||||||
|  |  | ||||||
|  | @ -778,7 +778,13 @@ class PDBPhotoMixin: | ||||||
|             yield parameters |             yield parameters | ||||||
| 
 | 
 | ||||||
|         if is_must_may_forbid: |         if is_must_may_forbid: | ||||||
|             mmf_results = searchhelpers.mmf_photoids(self, tag_musts, tag_mays, tag_forbids, frozen_children) |             mmf_results = searchhelpers.mmf_photoids( | ||||||
|  |                 self, | ||||||
|  |                 tag_musts, | ||||||
|  |                 tag_mays, | ||||||
|  |                 tag_forbids, | ||||||
|  |                 frozen_children, | ||||||
|  |             ) | ||||||
|             #print('mmf accept:', mmf_results) |             #print('mmf accept:', mmf_results) | ||||||
|         else: |         else: | ||||||
|             mmf_results = None |             mmf_results = None | ||||||
|  | @ -786,7 +792,13 @@ class PDBPhotoMixin: | ||||||
|         if mmf_results is not None and mmf_results['photoids'] == set(): |         if mmf_results is not None and mmf_results['photoids'] == set(): | ||||||
|             generator = [] |             generator = [] | ||||||
|         else: |         else: | ||||||
|             query = searchhelpers.build_query(orderby, notnulls, minimums, maximums, mmf_results=mmf_results) |             query = searchhelpers.build_query( | ||||||
|  |                 orderby, | ||||||
|  |                 notnulls, | ||||||
|  |                 minimums, | ||||||
|  |                 maximums, | ||||||
|  |                 mmf_results=mmf_results, | ||||||
|  |             ) | ||||||
|             print(query[:200]) |             print(query[:200]) | ||||||
|             generator = helpers.select_generator(self.sql, query) |             generator = helpers.select_generator(self.sql, query) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -291,6 +291,10 @@ form | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <script type="text/javascript"> | <script type="text/javascript"> | ||||||
|  | /* | ||||||
|  | These are defined so that we know we don't need to include them in the | ||||||
|  | constructed search URL, keeping it more tidy. | ||||||
|  | */ | ||||||
| PARAM_DEFAULTS = { | PARAM_DEFAULTS = { | ||||||
|     'limit': 50, |     'limit': 50, | ||||||
|     'view': 'grid', |     'view': 'grid', | ||||||
|  | @ -298,8 +302,8 @@ PARAM_DEFAULTS = { | ||||||
| function add_searchtag(box, value, inputted_list, li_class) | function add_searchtag(box, value, inputted_list, li_class) | ||||||
| { | { | ||||||
|     /* |     /* | ||||||
|     Called by hitting Enter within a must/may/forbid field. Checks whether the tag exists |     Called by hitting Enter within a must/may/forbid field. Checks whether the | ||||||
|     and adds it to the query. |     tag exists and adds it to the query. | ||||||
|     */ |     */ | ||||||
|     if (box.offsetParent === null) |     if (box.offsetParent === null) | ||||||
|     { |     { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue