- [overview] this commit fixes an issue where some images would be rendered
stretched in a browser due to a swapped width and height because of
intentional EXIF orientation mechanics.
- [server] `func/metadata.py`: added function to resolve the image's
dimensions after taking the EXIF orientation into consideration. normally,
this would only be done on the client side; however, since the server takes
those values into consideration for its own operations, it could also be
considered a "client". for example, thumbnail generation also depends on the
post's dimensions.
- [server] `func/posts.py`: refactored `update_post_content`. `func/images.py`
will no longer be used to determine the dimensions of a file since
`func/metadata.py` is now responsible for that.
- [server] refactored `func/metadata.py`
- [TODO] create migration to correct post dimensions
- [TODO] merge `func/metadata.py` with `func/images.py` and refactor
- [TODO] fix thumbnail generation
- [overview] add camera attribute to posts. parsing is done in
`func/metadata.py` and takes any of the available tags corresponding
to "make" and "model" properties and concatenates them into a string
- [server] improved `func/metadata.py`:
- added camera resolve functions for photos and videos
- moved ffmpeg subprocess and exif image opening to separate function
- optionally reuse existing collection of extracted tags in any of the
functions
- iterative approach to checking for tags' existence as opposed to
imperative
- (somewhat) better error handling
- [server] created alembic migration in `adb2acef2492_add_camera.py`
- not only adds columns, but also scans files and updates their camera
string
- [server] added camera attribute functionality and improved error
handling in `func/posts.py`
- [server] add camera attribute to `model/post.py`
- [server] wrapped exif image reading in a try..except, since it can
fail for some images. Also added a logger message to make it easier to
debug in the future, to fix compatibility issues and make debugging
easier
- [overview] implemented filtering and sorting by date taken, optionally
with null.
- [server] added `SORT_DESC_NULL_LAST` search token in `search/tokens.py`,
`search/base_search_config.py`
- [server] implemented `SORT_DESC_NULL_LAST` functionality in
`search/executor.py`
- [server] added date taken search aliases in
`search/configs/post_search_config.py`
- [server] added `NullCriterion` in `search/criteria.py`; it's literally
null
- [server] implemented filtering by null for date criterion in
`search/configs/util.py`
- [server] aliased `NullCriterion` to "null", "none", "unknown", or "?" in
`search/parser.py`
- [server][minor] added "posted" and "edited" aliases to creation_date
and last_edit_date
- [server] attempt to use DateTimeOriginal in `func/metadata.py` to
resolve date taken (compatibility issue originally found in photo
taken on LG Optimus L90)
- [client] only show date taken section on "image" or "video" post type,
since only they can possess date taken metadata
(`client/html/post_readonly_sidebar.tpl`)
- [client] added `date-fns` as dependency (it's much cleaner to format
dates this way)
- [client] added basic sidebar stuff in `html/post_readonly_sidebar.tpl`
- [client] updated `js/models/post.js` to reflect changes
- [client] added `formatUserFriendlyTime()` in `js/util/misc.js`
- [client] added `makeUserFriendlyTime()` in `js/util/views.js` in
conjunction with it
- [misc] ran post-commit; previous commits did not
- [server] created basic utility for resolving date taken @ `func/metadata.py`
- [server] utilize `func/metadata.py` in `func/posts.py`
- [server] created Alembic migration that adds `date_taken` column to `post`
- [server] updated `model/post.py:Post` to have new column
* `test_modify_saves_non_empty_diffs` needs non-transactional
db, so moved to seperate file
* Replaced incompatable usage of `db.session.rollback()`
with parametrerized function calls
* xfail conditionals for search removed, as we can no longer
get current driver with binds
* Also remove usage of deprecated `pytest.yield_fixture`
* Continue uploading remaining posts in an upload list even
when one fails
* Allow option to continue uploading even when similar posts are found
Closes#400