Commit graph

161 commits

Author SHA1 Message Date
da5c1ee008 Let PhotoTags have timestamps; use more js cards.
Tags on photos can now have timestamps, so that if you are tagging
a video or audio you can reference a specific moment with your tag.
In the interface, this means the tag is clickable and seeks to that
point in the media.

For the user interface, I am finding I need to move away from jinja
for the object cards because it is too much hassle to keep the code
for jinja-based cards for static rendering and the js-based cards
for dynamic rendering in sync. Rather than write the same cards in
two languages I can dump the JSON into the script and render the cards
on load. Which makes the static HTML worse but that's what the JSON
API is for anyway.
2023-09-17 14:07:22 -07:00
e1c47e8bf6 Minor decorator fix. 2023-06-25 21:13:52 -07:00
ef668c5d3b Add endpoint /batch/photos/generate_thumbnail. 2023-06-25 00:02:20 -07:00
ce30077013 First attempt at online permissions. 2023-02-04 13:49:42 -08:00
e78a667ee3 Move the session into requests.session for universal access. 2023-02-01 22:04:44 -08:00
e4f686c86f Move thumbnail blobs into the database.
I've moved the thumbnails around many times over this project
and hopefully it doesn't happen too many more. Once the database has
tens of thousands of items, the thumbnails start to become the biggest
headache on the disk. Backing up, restoring, and sharding files per
directory are slower and more effortful with separate files. In the db
means the db is a larger file, but this is disk space that was already
getting used anyway. Now it's simpler and has atomic transactions.
2023-01-27 17:34:32 -08:00
d5ac0b1717 Minor linting. 2022-11-19 22:43:44 -08:00
d13443d70e Match bytestring typo fix. 2022-11-13 19:12:50 -08:00
cc3cf58f46 Show cached counts in admin statistics. 2022-11-12 18:40:09 -08:00
e3a0b3898f Move /file/ urls to /photo/id/download. 2022-11-11 21:35:29 -08:00
bdce60fce6 Add statistics with object counts to admin page. 2022-11-11 19:26:36 -08:00
d1b0fb6aec Add Bookmark.atomify and /bookmarks.atom. 2022-11-11 11:41:24 -08:00
732c13440e Use flasktools.atom_response. 2022-11-11 11:39:04 -08:00
e89d6fe10e Remove "UTC" from the isoformat since it already contains +0000. 2022-11-09 19:41:48 -08:00
11706cc1c7 Add admin button to clear all login sessions. 2022-11-07 17:51:02 -08:00
b64901105c Move search to an entire class of its own.
The initial motivation for this was to make the "more_after_limit"
feature, which would help the UI to not show a next page button when
the number of results was exactly equal to the limit.

However, in order to surface this more_after_limit status using only
the old search generator, it would have to be a special yield at the
end. I was getting tired of the special yields like give_back_params
at the beginning and warning_bag at the end, and this would be worse.

There is a lot of sideband information about the search that is now
more easily accessible when the search is its own object.
2022-11-06 22:58:36 -08:00
de2bf6a81a
Move login code over to User object. 2022-11-06 22:59:12 -08:00
a514ed5ff3
Use voussoirkit timetools. 2022-11-06 22:59:11 -08:00
172a539f24
Default yield_albums to false instead of true.
I'm finding I just don't like the ux of having them on default.
2022-10-29 17:17:37 -07:00
328e84b0c7
Fix search by SHA256, didn't finish implementing. 2022-10-29 17:17:37 -07:00
1e5fc81019
Rename endpoint function logout -> post_logout. 2022-10-01 14:24:36 -07:00
3767558c66
Add search filter has_albums.
Sometimes it's nice to search just for the free spirits.
2022-09-28 19:49:01 -07:00
57f1b80442
Use SQL generated columns for area, aspectratio, basename, bitrate. 2022-08-13 18:08:45 -07:00
6dd4cfe59b
Add admin endpoint uncache. 2022-07-22 19:23:36 -07:00
d61f504d60
Alphabetize functions. 2022-07-22 16:43:29 -07:00
2562084fce
Experimental atom feed for photos, albums, search. 2022-07-20 19:03:27 -07:00
4001f6f371
Use datetime objects instead of timestamps in object model.
Trying to make better use of objects in this object oriented language.
2022-07-20 19:03:26 -07:00
49992f59aa
Add /admin/dbdownload. 2022-07-20 19:03:25 -07:00
0e00a1e981
Use new worms version. 2022-07-20 19:03:25 -07:00
e6f5d16a03
Bring catch_etiquette_exception into common.
The decorators file only had a single function in it.
2022-04-05 11:53:35 -07:00
93e03656ca
Small tidy ups. 2022-03-26 13:22:01 -07:00
4261c42512
Add xdg-open for non-windows use. 2022-01-11 01:00:36 -08:00
5efad72425
Use log.warning for traceback instead of print_exc. 2021-12-21 16:55:46 -08:00
017523bdac
Return 404 if we try to reload_metadata on a missing file. 2021-12-21 16:55:03 -08:00
1e9e948431
Move decorate_and_route to flasktools. 2021-10-31 15:11:17 -07:00
1f18713875
Add reminder of what __file__.parent.parent evaluates to. 2021-10-31 15:10:54 -07:00
f0d302d4a5
Move give_theme_cookie to flasktools. 2021-10-30 17:29:43 -07:00
6ac1d8a90a
Add remark about X-Forwarded-For. 2021-10-24 23:21:11 -07:00
779eff1761
Don't show the registration form if registration is disabled. 2021-10-24 22:17:50 -07:00
6794caa32b
Call photo._uncache instead of doing it manually. 2021-10-18 14:10:59 -07:00
91cf08efde
Match renamed flasktools.json_response. 2021-10-01 23:05:46 -07:00
fd42ef16e1
Add admin endpoints. 2021-10-01 22:42:45 -07:00
0c51201901
Move truthystring to stringtools. 2021-09-05 01:21:04 -07:00
d4025e865b
Move cached_endpoint, required_fields to flasktools. 2021-09-03 12:45:07 -07:00
2e0b4cfa14
Replace run_generator with gentools.run. 2021-08-31 19:23:56 -07:00
e9d5711f29
Some linting. 2021-08-20 22:54:12 -07:00
82a6103d8d
Fix leftover imports. 2021-06-08 16:04:20 -07:00
f003f55fca
Move make_json_response to voussoirkit.flasktools. 2021-06-04 21:49:45 -07:00
47c4790d36
Remove unnecessary intermediate variable ip. 2021-06-04 21:33:55 -07:00
7f8a007e2d
Add decorators.give_theme_cookie to decouple from render_template.
I realized it was not appropriate for render_template to be handling
this responsibility, but previously did not think of another way.
Now I did.
2021-06-04 21:29:23 -07:00