9939f5da1d
For sql_insert / _update, let default commit=False.
...
Because all the calls are using it that way anyway.
2018-02-17 14:01:12 -08:00
6363cb5fc0
Rename Album.associated_directories -> get_associated_directories.
2018-02-17 13:33:27 -08:00
b4a28f5034
Make Photo.bytestring a @property.
...
This is the kind of thing that should be a @property, because
it's very low processing power and doesn't hit the database.
2018-02-16 23:16:02 -08:00
bbe392ac09
Rename Photo.author -> get_author; no longer a @property.
2018-02-16 23:11:25 -08:00
205c49c21f
Rename Photo.albums -> get_containing_albums.
2018-02-16 23:08:44 -08:00
2f9b51b636
Rename Photo.tags -> get_tags.
2018-02-16 23:07:21 -08:00
ac9d7ede22
Rename Album.photos -> get_photos.
2018-02-16 23:03:54 -08:00
6574450ad1
Rename Tag.synonyms -> get_synonyms.
2018-02-16 23:01:07 -08:00
fdcf07940a
Rename Groupable.children -> get_children.
2018-02-16 23:00:43 -08:00
75effafaf5
Rename Groupable.parent -> get_parent.
...
After making the "if x.parent is None" mistake too many times,
forgetting that it was not a @property, I've decided that the
verby name is better.
2018-02-16 22:59:34 -08:00
3c4f69f647
Specify name= on calls to PDB.get_tag.
...
Sometimes it's easy to forget whether its the name or ID,
and I like the consistency of specifying.
2018-02-16 22:25:56 -08:00
1c1e7f158f
Minor fixes & pylint appeasements.
2018-02-16 21:28:36 -08:00
e5a316ff9c
Remove old SQL_ constants. Use the dicts.
2018-02-16 20:40:58 -08:00
a8ead9c0c9
Replace a lot of manual insert/update with helper.
2018-02-16 20:19:18 -08:00
4e8a67aa54
Avoid sql indexing by instantiating User earlier.
2018-02-16 18:40:57 -08:00
f7dcb489c5
Remove unnecessary intification of timestamps.
...
I decided I want to have higher precision especially because
batch inserts were having several photos with the same
created timestamp making orderby >= dumb.
2018-02-03 01:35:32 -08:00
178a7df0b3
Add some more log debugs.
2018-01-11 19:32:15 -08:00
b5902ba4f1
Integrate voussoirkit sqlhelpers.
...
https://github.com/voussoir/else/tree/master/SQLHelpers
2018-01-09 21:15:50 -08:00
0d0354f4da
Rename normalize_filepath to remove_path_badchars.
...
Because the function does not do any resolving or converting
to an absolute path, I feel the name 'normalize' is inaccurate
and could be misleading when read. This is more clear.
2017-12-07 21:15:10 -08:00
a7b5a7d42a
Multiple small cleanups, docstrings, messages, lint improvements.
2017-11-27 15:56:16 -08:00
be35f3bb1f
Fix Tag.rename from raising TagExists for old instead of desired new.
2017-11-23 21:58:38 -08:00
74f4e74bdf
Add a few docstrings and update readme to-do list.
2017-11-16 16:46:39 -08:00
a510c7b55c
Improve Album bytes caching, start caching photo count.
...
More careful uncaching of the summed bytes, to minimize
recalculation. Fewer cases where the album itself
is removed from the photodb's getter cache.
This also helps the download link on album pages disappear if
the child albums don't actually have any photos.
2017-11-12 15:21:53 -08:00
96856e9361
Cleanup: More minor dusting, commenting, clarity renaming.
2017-11-11 22:49:03 -08:00
bb5fa816d8
Cleanup: Rename GroupableMixin.add to add_child for clarity.
...
Especially since for albums it might sound like you're adding a photo.
2017-11-11 22:41:26 -08:00
26a034c9a0
Make Photo.author a @property; None if no author.
2017-09-23 10:58:04 -07:00
bd847159fa
Organize config by nesting related stuff.
...
I thought about switching to .ini files but that's even less desirable.
2017-07-29 16:23:15 -07:00
1784e584e2
Don't let Bookmark.edit with a blank url.
2017-07-13 22:58:02 -07:00
707a9ab7c2
Fix a few bugs when photo.bytes is None.
2017-06-15 23:08:20 -07:00
6bed300496
Add more feature_required decorators and config.
2017-06-14 23:15:47 -07:00
bc5df9f1c2
Add max_len parameter to Tag.qualified_name.
2017-06-13 20:11:30 -07:00
55c14f3844
Don't leave bitrate undefined for non-temporal photos.
2017-05-12 17:50:31 -07:00
a4a278c173
Give Tags a description field.
2017-05-12 17:31:17 -07:00
a485be3c64
Make bitrate a real attribute instead of calculating in jinja
2017-05-11 22:34:19 -07:00
a5924b4642
I don't know how I forgot about dict(zip())
2017-05-11 22:32:55 -07:00
83b9adbd61
Add more uncache points to help with stale data
2017-05-01 21:16:10 -07:00
06522ee372
Minor cleanup
2017-05-01 20:49:59 -07:00
43bc1e74fc
Add method Album.add_associated_directory
2017-05-01 20:43:45 -07:00
09f209719b
Add decorators.@required_feature to centralize FeatureDisabled exc.
2017-05-01 20:41:56 -07:00
af6785cead
Add decorators.@transaction to rollback sql upon exception
2017-05-01 20:23:58 -07:00
6ea3e67d86
Add method associated_directories.
2017-04-22 21:39:07 -07:00
82ca1a08da
Add superinit to the objects.
2017-04-22 21:16:30 -07:00
cc0c847eb5
Make sure easybake uses the normalized name in return notes.
2017-04-20 18:28:11 -07:00
dcb946f3df
Add _uncache to objects
2017-03-23 00:04:44 -07:00
d35011c083
Add Photo.relocate for fixing external renames
2017-03-22 23:18:09 -07:00
13040d559b
Cache objects for faster re-access; Cache album.sum_bytes result
2017-03-22 22:54:17 -07:00
97400a448b
Fix bug which left album dir associations after deleting album
2017-03-19 18:48:12 -07:00
8793d9ff41
Fix docstrings over 80 characters
2017-03-19 17:34:19 -07:00
80a861deee
Add 'enable_photo_reload_metadata' and '...generate_thumbnail'
2017-03-17 14:01:39 -07:00
f222ae7182
Add 'enable_photo_add_remove_tag' config
2017-03-17 00:10:33 -07:00