Commit graph

1569 commits

Author SHA1 Message Date
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
028a8cb2ef All of the INTERSECTs can just be WHERE clauses. 2018-04-04 22:08:08 -07:00
c0df14db62 Fix typo binding -> bindings. 2018-04-04 21:40:39 -07:00
abe82dde9e Let get_tag_by_name use cache after finding the ID. 2018-03-31 14:01:03 -07:00
ac41598bb0 Add some more give_token.
I probably should just put it as a global pre-request hook.
2018-03-29 19:24:48 -07:00
d9f5765bcc Use more self.sql_ instead of own cursors. 2018-03-29 19:24:48 -07:00
144e97d365 Use self.photodb.sql_ methods instead of running own cursors.
All in the name of centralization.
Also improved SQLness of Tag.convert_to_synonym.
2018-03-29 19:24:48 -07:00
2edb9a1d57 Centralize cursors to PDB.sql_execute.
This gives me a nice common place to do logging if I want.
2018-03-29 19:24:39 -07:00
cca8837863 Move helpers.select_generator to PDB.sql_select. 2018-03-25 16:32:17 -07:00
cfa5d269d1 Add keybinds CTRL+A and +D to select/deselect all cards. 2018-03-23 11:58:39 -07:00
27885df64e Fix binding of the fallback handler. 2018-03-23 10:25:03 -07:00
da47b5bb3c Fix several small, embarassing typos. 2018-03-23 01:18:43 -07:00
abaeb2321f Oops, should be .remove instead of .pop for the cacheclass. 2018-03-23 00:35:56 -07:00
77dfeb4299 Add more _assert methods to hide clutter. 2018-03-23 00:35:56 -07:00
229530580f Add Tag.normalize_description. 2018-03-23 00:35:56 -07:00
b4d3de3651 Add Bookmark.normalize_title and _url. 2018-03-23 00:35:56 -07:00
6ee86431e5 Add Album.normalize_title and _description. 2018-03-23 00:35:55 -07:00
dddd8a3aa1 Add ObjectBase.normalize_author_id. 2018-03-23 00:35:47 -07:00
1f7749b80a PDB.new_album call album.add_photos instead of add_photo. 2018-03-22 23:11:25 -07:00
0e3ae11610 Improve normalizers, use less None; Add author search box.
It was getting difficult to remember which of the normalizers
use None and which don't. So let's try to be a little more consistent
and just use empty sets, etc, so the caller can rely on receiving a
set instead of having to check for None.

Also renamed search parameter authors->author to be more in line
with the singular form of extension.
2018-03-22 21:09:21 -07:00
088a79ffff Add method PDB.get_users. 2018-03-22 21:06:05 -07:00
5c89e13129 Update DatabaseOutOfDate message to use new upgrader path. 2018-03-22 17:34:43 -07:00
5be174d1b3 Completely rewrite search to use more SQL and less application.
In order to achieve tag_musts, we break each of the musts down
into separate EXISTS queries for each of the matchable children.
Then we INTERSECT those, and finally do other filtering and
ordering as usual.
2018-03-21 19:20:43 -07:00
db827d17ec Add to do regarding extension not being updated by override. 2018-03-21 19:20:06 -07:00
1e42f1ea4e DB V12: Add (photoid, tagid) index to photo_tag_rel. 2018-03-21 19:00:13 -07:00
acc9b67a20 Add parameter minimal to jsonify.tag. 2018-03-21 18:48:38 -07:00
6c77ddd1c3 searchhelpers.normalize_author use un only, not IDs.
I don't like the idea of a user setting their username to be
someone else's ID.
2018-03-21 13:21:25 -07:00
afc5f38a8d Combine normalize_limit, _offset to normalize_positive_integer. 2018-03-21 11:25:21 -07:00
1d76b4511b Let PDB.get_tag convert normalization errors to NoSuch.
Instead of having to account for them on the other end,
since they don't care about that stuff anyway.
2018-03-21 11:03:58 -07:00
7b4ae3045a Remove some excessive newlines from photo_card output. 2018-03-19 22:52:15 -07:00
efd8e28c01 Remove Album improvements from readme.
I forgot to do this during 30d8d08.
2018-03-19 15:17:19 -07:00
b4cd4b6130 Fix body not filling vertical space. 2018-03-19 15:06:07 -07:00
45bd80caa4 Remove height:40px from plain_link. Only nice_link. 2018-03-19 15:03:53 -07:00
b90971813f Oops, fix broken click-to-join because of the qualname change. 2018-03-19 14:11:25 -07:00
fba75c0325 Add some contact info to contributing.md. 2018-03-19 04:03:45 -07:00
b5274fefb9 Add caching.py to enable browser caching of files. 2018-03-18 21:42:31 -07:00
ea7401b4f2 Fix common.send_file to use pathclass. 2018-03-18 21:40:32 -07:00
0de755f138 Let the SessionManager use a cacheclass instead of plain dict. 2018-03-18 21:23:48 -07:00
b247ba3d63 Bump voussoirkit requirement to 0.0.23 for cacheclass.__contains__. 2018-03-18 21:00:58 -07:00
9a1caee412 Add helper function hash_file. 2018-03-18 20:56:29 -07:00
2d73e59abf Let helpers.read_filebytes operate on pathclass Paths. 2018-03-18 20:56:08 -07:00
a5aef63c6f Tags on this page should also display qualnames with maxlen. 2018-03-18 19:47:08 -07:00
a6babe116e Add some more notes about junctions.
Instead of, you know, actually writing the setup.py file.
2018-03-18 17:51:42 -07:00
e186653e36 Use shutil.which to discover ffmpeg.
How did I miss such an easy solution for so long??
So glad I did not go the env var route.
2018-03-18 17:03:11 -07:00
84599b44f7 Store author for bookmark creation. 2018-03-18 15:59:58 -07:00