Commit graph

1563 commits

Author SHA1 Message Date
40c255b0d0 Pass object instantiations through a cacher.
I want the system to only have one instance of a particular
object at any time, so that we can effectively cache things
in them.
2018-05-06 21:09:08 -07:00
11fda94968 Make the SQL_COLUMNS code a bit easier to read. 2018-05-06 21:09:02 -07:00
db28b6819c Replace individual cache instantiations with all at once. 2018-05-06 21:08:56 -07:00
96d79f2b25 Oops, let separate loading of pragmas for not-first-time load.
Since DB_INIT was only run during first time setup, all future
loads were not running the pragmas, not even the FK restriction.
2018-05-03 19:02:53 -07:00
64449569ea Rearrange statements during tag delete to not voilate FK. 2018-05-03 18:59:50 -07:00
23cc769357 Take advantage of parent's cached_qualname when making mine. 2018-05-03 18:45:57 -07:00
943deb9bf7 Move child-lifting code to its own helper method. 2018-05-03 18:32:44 -07:00
ae46b097e4 Let get_tag_by_name return inputted Tag right away.
For caller's convenience most functions assume you are passing
name as a string, but if you already have the Tag we'll just use it.
2018-05-03 18:20:48 -07:00
a0e3e037c1 Bail out of join_group early if already immediate parent.
I'd rather make the extra select than a delete and reinsert.
2018-05-03 18:18:13 -07:00
22269af2ca Always use False for leave commit before joining new group. 2018-05-03 18:10:12 -07:00
a8fc1206d9 Oops, move get_root_tags into alphabetical position. 2018-05-02 17:41:46 -07:00
4002cc660e Don't use shortlink for zoom url. It breaks caching. 2018-05-01 21:03:10 -07:00
58d450a856 Fix handling of the event that a file loses its thumbnail.
In which case return_filepath is None and the relative_to breaks.
2018-05-01 20:41:38 -07:00
1626a6fa11 Optimize PDB.get_root_albums and get_root_tags.
Achieves in a single query what used to require a ton of
individual get_parent calls.
2018-05-01 20:32:45 -07:00
8c356df6fd Add P_photos to batchify some api operations. 2018-05-01 18:09:35 -07:00
6d349aa235 Update to do list with more batching ideas. 2018-05-01 18:06:27 -07:00
48396d6ab6 Add Album.remove_photos for batch removals. 2018-05-01 18:05:07 -07:00
698981dd29 Move _uncache_sums call out of _add_photo, into callers. 2018-05-01 17:48:56 -07:00
fa97512586 Use batches of 999 for get_things_by_id.
SQLite has a limit on how many variables you can use per query.
2018-05-01 17:48:02 -07:00
97e1f881d0 Move video thumbnailing code to helpers. 2018-04-28 20:36:33 -07:00
5bc2bbdacb Move image thumbnailing code to helpers. 2018-04-28 20:33:05 -07:00
41823394eb Use PDB.get_albums_by_id for Photo.get_albums. 2018-04-28 19:17:11 -07:00
62496d183e Use PDB.get_tags_by_id for Photo.get_tags. 2018-04-28 19:14:58 -07:00
b19682d1a5 Replace Photo.sorted_tags with jinja filter. 2018-04-28 19:05:51 -07:00
50592f0ab4 Rework tab titles from "Album X" to "X | Albums" etc.
To prioritize the most unique and relevant piece of information.
2018-04-27 20:04:24 -07:00
df7fbeae0a Minor clarity improvements to required_feature logic. 2018-04-27 20:04:18 -07:00
e2cf9344c1 Copy the inputted new_photo_kwargs so as not to damage it.
Also I learned that pop takes a fallback.
2018-04-20 15:31:41 -07:00
fec5eaf21e Add Tag.normalize_name to be called by PDB.normalize_tagname. 2018-04-20 15:28:27 -07:00
bdec6cf4a3 Add filter to generate /file/ link with appropriate basename.
Because inlining the |urlencode every time is easy to forget.
2018-04-19 19:29:06 -07:00
bef91b3243 Allow /file/ to be accessed with a basename. 2018-04-19 19:23:10 -07:00
79465b803e Remove album size caching from to do list.
With the recent improvements in album size determination this
is not necessary.
2018-04-19 19:00:16 -07:00
a12d8cada1 Don't capture ctrl+a if currently in a text field. 2018-04-17 18:35:32 -07:00
4491fa3b5a Fix quotation mark in example set command. 2018-04-15 21:53:39 -07:00
baf53c4759 Update readme with more setup and launch info. 2018-04-15 21:34:05 -07:00
ed3b67bdb9 Split runner entrypoint from default local runner. 2018-04-15 20:34:03 -07:00
4434517c54 Rename config user.min_length -> min_username_length. 2018-04-15 14:36:07 -07:00
21bd211889 Give Users a display_name. 2018-04-15 14:23:24 -07:00
8562b355ce Fix typo in debug commit message. 2018-04-15 13:49:10 -07:00
df211454bb Include username and password length requirements on form. 2018-04-15 13:20:08 -07:00
31b808bd64 Fix get_things_by_id not putting the results in cache. 2018-04-15 02:53:14 -07:00
7d8b8daeba Rewrite Album.sum_bytes to use SQL sum in a single query. 2018-04-15 02:52:41 -07:00
f77ab51b14 Add Album.has_any_photo and has_any_subalbum_photo. 2018-04-15 02:41:24 -07:00
0ee07023a1 Fix ids_needed being modified while iterating. 2018-04-15 02:35:46 -07:00
518a45ccd8 Add method get_things_by_id for mass lookups. 2018-04-15 02:14:06 -07:00
68d6e4faf4 Add explicit method get_album_by_id. 2018-04-15 02:10:42 -07:00
0094e7c006 Fix bug where add_tag supersedence caused early commit. 2018-04-15 01:14:20 -07:00
bfc4f313a9 Switch some formats to f-strings. 2018-04-15 01:13:02 -07:00
0c9582598d Add arg --https even for non-443. 2018-04-15 01:00:37 -07:00
c1fd863999 Add jinja_filters.py with bytestring. 2018-04-15 00:59:54 -07:00
4fcb524211 Show number of photos in h3 on Album page 2018-04-06 21:50:13 -07:00