Commit Graph

1647 Commits

Author SHA1 Message Date
Dave Shoreman
e9619c1242
Fix repeated superuser creations after rename/removal (#263)
* Avoid creating superuser if variables are removed

Enables the removal of `TA_USERNAME` and/or `TA_PASSWORD` as a way of
preventing an additional superuser being created when another exists.

In the old code, `ELASTIC_USER` would never error due to the default, so
this replaces the loop with one requirement on `ELASTIC_PASSWORD`.

* Use .superuser_created to prevent re-creation

Creates an empty `.superuser_created` file after successful creation,
and uses this to skip the command on future runs. If the file doesn't
exist, then `TA_USERNAME` and `TA_PASSWORD` will also be required.

* The superuser password can't be empty

...well—it *can*—but the password input of the login form requires a
value so even though the account is created, you can't actually login.

* Parse createsuperuser output for 'exists' error

If a user already exists with the same name as the superuser being
created, the command fails with "Error: That name is already taken".

It's probably safe to assume that user is the one we expect. This parses
the output, treating it as successful so it can be skipped next time.

If it hits the catch-all, something probably failed so we exit.

* Use the cache for persistence

Updates the .superuser_created file to be placed in /cache so that it
gets persisted in a volume between config tweaks and container rebuilds.

Also makes `TA_PASSWORD` required always, because it seems to be needed
by tubearchivist/config/settings.py to generate a secret key.

* Let it work outside Docker

If /cache doesn't exist (i.e. when it's not running in Docker), this
falls back to a `cache` dir in the current working directory instead.

Also renames the file to 'initsu.lock' rather than having it hidden.

* Use flexible fallback path for `celery` command
2022-06-22 18:29:46 +07:00
49d33a2765
Improved Cookie handeling, #build
Changed:
- Cookie: Use IO Stream from Redis directly for cookies
- Cookie: Don't load invalid cookie
- API: Import cookie with PUT request
- Redis: Don't expire Redis messages by default
- Redis: Connections expire automatically
2022-06-21 08:14:01 +07:00
ecc58f6c11
API: note about release lagging behind 2022-06-21 08:10:00 +07:00
e5f43e5fe9
API: implement cookie PUT request to import cookie 2022-06-21 08:06:38 +07:00
499c47c7a1
move set_cookie to separate method for reusabliity 2022-06-21 08:01:33 +07:00
2cf30e1127
refactor: default set_message in RedisArchivist to True 2022-06-16 10:37:46 +07:00
ebfc4a349f
center title and tiles 2022-06-15 18:30:06 +07:00
150c1dc273
add tiles to readme 2022-06-15 18:18:52 +07:00
30abbe9be7
rewrite cookie into redis from io stream, auto validate 2022-06-15 17:54:05 +07:00
40e4ef0e05
auto expire redis connections after 3600secs 2022-06-15 16:36:41 +07:00
2ceb1b701a
consolidate config of cookie revoke 2022-06-15 15:39:24 +07:00
2ad093a9a8
handle cookiejar.LoadError dont import invalid cookie 2022-06-15 10:39:48 +07:00
09a94d0df5
set relative values directly with path arg 2022-06-15 10:27:29 +07:00
f7f4ca7728
API update, #build
Changed:
- API: Added Task get view
- Added is_locked method for redis lock check
- Updaded base and libs
2022-06-15 09:24:01 +07:00
83a90000c6
bump base image 2022-06-15 09:23:41 +07:00
lamusmaser
bbb16bb3c2
Update TaskAPIView with GET - #257 PR (#258)
* Initial commit for GET response for TaskAPIView.

* Update for missing space - linting issue.

* Additional linting fixes.

* add is_locked method to check if lock is set

* Update to use `.is_locked` method and add decorator.

* Fix linting issue.

* Fix doubled "rescan" call for locked file.
Removed call to ".owned()" under "is_locked".

* Commenting out GET call in TaskAPI view to revert change for testing.

* Commenting is_locked function to see if Server Response 500 is stopped.

* Reassert is_locked function within RedisArchivist class.

* Create test GET responder.

* Reverting simple GET response change.

* Reapplying simple GET response for `/api/task/`.

* Reapplying change with modification to lock key.

* Documentation update for new GET calls.

* README: fix returned value as `bool` instead of `str`.

* Updating the `is_locked` key reference to "rescan" and "downloading" to fix which key is being retrieved.

* Use dictionary keys, rather than line-by-line statements.

* Fix typo in README for Task View.

Co-authored-by: simon <simobilleter@gmail.com>
2022-06-15 09:15:59 +07:00
4d9ee4494f
bump requests 2022-06-14 14:26:49 +07:00
eeeabca8c2
bump dependencies 2022-06-07 17:09:49 +07:00
bb0f3dad1a
update roadmap 2022-06-04 11:19:47 +07:00
9c0c263fce
new docker build for build server task 2022-06-04 11:16:46 +07:00
aed2d34149 Merge branch 'testing' for release v0.1.6 2022-06-04 10:15:24 +07:00
3504408e70
update TA_VERSION to v0.1.6 2022-06-04 09:47:51 +07:00
41b3e06f73
update docs for v0.1.6 2022-06-01 17:00:06 +07:00
c41f0a7cc4
try to LOAD_TRUNCATED_IMAGES, #256 2022-06-01 09:04:55 +07:00
19d9af821d
grid row ui improvements, #build
Changed:
- Better styled grid row, hid controlls if not applicable
- Changed subtitle naming convention
- Timeout for search as you type
- move delete queue button to settings page
2022-05-31 16:40:54 +07:00
5d262d7d48
skip cookie if no config added to YtWrap 2022-05-30 18:22:17 +07:00
231ac1e012
make channel matching optional for reusability 2022-05-30 17:59:52 +07:00
cbb714c235
show grid count controls only if applicable 2022-05-30 16:21:24 +07:00
c93e935b9c
move delete download queue button to settings page 2022-05-30 16:06:12 +07:00
c6d696a91b
timeout search as you type 2022-05-30 15:29:52 +07:00
a9b8d34b5a
adapt search width with grid_items 2022-05-30 14:52:47 +07:00
25e2bdb0b7
bump celery version 2022-05-30 14:51:44 +07:00
bbb0c26498
fix subtitle delete overwrite, change filename to .lang.vtt, #195 2022-05-29 11:43:25 +07:00
386c456415
variable gird row items, #build
Changed:
- implemented configurable video items in grid row
- fix subtitle parser bug with missing segs key
- fix also delete video from playlist
- fix channel video extractor after refactor
2022-05-28 21:54:47 +07:00
51a45bb59e
implement variable grid row size for playlist_id 2022-05-28 21:48:15 +07:00
0759b4f220
reset mobile variable gird row count 2022-05-28 21:41:17 +07:00
9f92bf95b4
mark video as downloaded false when deleting video 2022-05-28 21:23:56 +07:00
e638f8b487
skip subtitle segment without segs key, #249 2022-05-28 17:47:21 +07:00
caaed252f9
specify videos page for get_last_youtube_videos of channel 2022-05-28 14:34:01 +07:00
5982932457
implement variable grid row size 2022-05-28 13:57:29 +07:00
9a31243b1c
log message when skipping video 2022-05-28 11:11:09 +07:00
88e526f5e5
refactor new YtWrap class for yt-dlp calls, #build
Changed:
- new yt-dlp base class
- new cookie class using io_stream
- MetadataFromField postprocessors
2022-05-25 16:15:38 +07:00
Clark
730ac15349
Fix #241 Use title/uploader for embedded metadata not Content ID (#252) 2022-05-25 16:13:25 +07:00
0ac9243389
remove unused monitor_cache_dir method 2022-05-24 15:54:41 +07:00
c39f8a9cb8
refactor use cookie io_stream 2022-05-24 15:51:58 +07:00
9dd1e9a29f
extract playlists with new YtBase class 2022-05-24 10:44:18 +07:00
3f5104d6d8
integrate new YtWrap class in download queue and subscriptions classes 2022-05-24 10:36:39 +07:00
4b00f454b7
integrate new YtWrap class in yt_dlp handler 2022-05-24 10:19:02 +07:00
33f27f018f
handle download error 2022-05-24 10:18:33 +07:00
a7d9b4584b
implement new YtBase class for index classes 2022-05-24 10:01:30 +07:00