Commit graph

69 commits

Author SHA1 Message Date
297f82bf8e fix early SQL patch
We need to remove the view on the movies table first, otherwise we might
run into an internal integrity error.
2021-12-07 23:22:51 +01:00
f2cb66b0bf update dependencies 2021-12-07 21:18:55 +01:00
57a2bccb44 add pyright to linting 2021-12-07 21:03:31 +01:00
3c9da10522 upgrade Python to 3.10, and update all dependencies 2021-11-02 14:16:00 +01:00
dd3d5f3670 fix user rating refresh if a user is unavailable
If a user's ratings cannot be accessed, e.g. due to network errors, it
should skip to the next user.
Ideally we could mark a user as inactive after X failed retries.
2021-11-02 14:14:32 +01:00
52c08f0fd8 add new IMDb movie type: tvPilot 2021-08-22 14:44:29 +02:00
18b95f91f9 use more compact JSON repr 2021-08-18 20:08:09 +02:00
b676c9ddde fix SQLite locking errors 2021-08-18 20:02:10 +02:00
f964c0ceb9 UI: add support for year specification in search 2021-08-07 14:32:32 +02:00
181719c6d9 add force option to movie reload
In case an import fails we need to skip checking whether the IMDb
export dumps changed.
2021-08-06 14:23:21 +02:00
b2caaa8bc3 fix updating user ratings from IMDb
We need to use the existing user from the DB to avoid overwriting the
user's secret or other details.
We also can't assert the user will stay the same, because at least
their name is allowed to change.
2021-08-06 12:56:01 +02:00
b8fab34418 support local scripts & env in run script 2021-08-06 12:30:06 +02:00
792806f304 Merge branch 'ui' 2021-08-05 19:20:33 +02:00
000ab4c4d4 improve info message 2021-08-05 19:19:54 +02:00
40459cf9ff update pip packages 2021-08-05 19:18:52 +02:00
7dacab9b77 clean up container contents
The UI should be built and served separately, not from within the
production container.
The tests should be run separately as well and are not needed from
within the production container.
2021-08-05 19:18:52 +02:00
0532676fa4 lint 2021-08-05 19:18:52 +02:00
9acd534706 make more aspects of API & UI hosting configurable
This is necessary to create proper dev & production builds of the app.
2021-08-05 19:18:51 +02:00
ebdf3a39f3 update npm packages 2021-08-05 15:59:43 +02:00
69eb68a9a4 add UI selector for user ratings (group or own)
Allow a user to access their own dataset.
Add a route for admins to give users access to groups.
2021-08-05 15:53:27 +02:00
fb059ae5d1 lint 2021-08-04 17:32:00 +02:00
ff4f8fa246 filter ratings for movies index route 2021-08-04 17:32:00 +02:00
e56ff8a6e6 fix conversion to imdb rating in JS 2021-08-04 17:32:00 +02:00
bae0415a24 fix up movies index route [wip] 2021-08-04 17:32:00 +02:00
7cc540b6fd fix encoding user credentials 2021-08-04 17:32:00 +02:00
e2a3f0b6fa add per user group management
Drop the secret from groups, instead set per user access rights to
read or write group information.
2021-08-04 17:32:00 +02:00
14f2395fa6 improve some type annotations 2021-08-04 17:32:00 +02:00
1413ba896f add basic auth for non-admin users 2021-08-04 17:32:00 +02:00
f7913c30c8 add secret to User & add user REST routes 2021-08-04 17:31:59 +02:00
9bb433eb0c add helpers to retrieve request data 2021-08-02 18:33:48 +02:00
c1b41d3882 add gzip & CORS middleware 2021-08-02 18:21:12 +02:00
b47dfc579b add Vue UI [wip] 2021-07-28 23:08:10 +02:00
3d5656392e store error in progress 2021-07-28 23:07:04 +02:00
e939e57a8f fix creating dud progress entries
When the import process finishes it can set progress to 100 multiple
times.  The first call would add a stop time to the running progress,
but each further call with progress=100 would create another entry in
the table with stop already set.
2021-07-27 23:47:34 +02:00
57cfd8f496 fix lazy init calling default factory
If no default factory is set the value is actually some internal
sentinel object (dataclasses._MISSING_VALUE) instead of something falsy
like `None`.
2021-07-27 19:34:28 +02:00
b0832b8659 fix support for lazy init for db.update 2021-07-27 19:32:47 +02:00
3f9cec3e79 import IMDb vote count from user ratings 2021-07-25 18:06:17 +02:00
159ffce4b4 add creation timestamp to movies 2021-07-25 18:06:17 +02:00
5514a8d1e1 fix utc datetime generator
m(
2021-07-25 18:06:17 +02:00
fe5db535a9 add route to check state of latest IMDb movie import 2021-07-25 18:06:17 +02:00
1fd592cb1d fix imdb data dir in script 2021-07-25 18:06:17 +02:00
8d20cc040e add IMDb vote count to movies 2021-07-25 18:06:17 +02:00
af25d9c5a2 change the container to be more production ready
This includes the code files in the docker image and creates a separate
data dir, which means we don't need to manually mount files into the
container anymore.
2021-07-25 18:06:17 +02:00
24aabd43f2 exclude *.local from git 2021-07-25 18:06:17 +02:00
4193c32955 add locking & progress report to IMDb import (web) 2021-07-25 18:06:15 +02:00
5ad4946f5b fix percentage reporting semantics
This wasn't actually (much) broken, but we got burnt because percent
should mean [0, 100], not [0, 1].
2021-07-11 18:59:01 +02:00
cc0ba96a9e add route for admins to list all groups 2021-07-11 17:24:52 +02:00
88fa1355cd remove transaction from imdb import
Removing the transaction will allow other (async) operations to succeed
while the import is running, otherwise the database will be locked.
It also actually speeds up the import process, and there's no good
reason to roll back if the import aborts mid run.
2021-07-11 17:23:19 +02:00
294e311aff add new admin routes to trigger database updates
The two routes offer reloading the whole movie database from IMDb, and
reloading all users' IMDb ratings.
These functions (or very similar) were already available using the CLI,
but now they can be triggered remotely by an admin.
2021-07-10 19:32:08 +02:00
1805282d41 refactor loading of imdb ratings to yield loaded ratings 2021-07-10 01:43:24 +02:00