Add watchlist auto-download settings
This commit is contained in:
@@ -51,6 +51,7 @@ class HandlerContext:
|
||||
test_discord_webhook_config: object
|
||||
thumbnail_file_path: object
|
||||
update_all_watchlist_statuses: object
|
||||
update_watchlist_auto_download: object
|
||||
update_watchlist_category: object
|
||||
update_watchlist_status: object
|
||||
upload_watchlist_thumbnail: object
|
||||
@@ -519,6 +520,17 @@ class Handler(BaseHTTPRequestHandler):
|
||||
Handler._runtime(self)
|
||||
payload = Handler.require_fields(self, self.body_json(), "show_id")
|
||||
self.json(Handler._context(self).update_watchlist_category(payload["show_id"], payload.get("category")))
|
||||
elif parsed.path == "/api/watchlist/update-auto-download":
|
||||
Handler._runtime(self)
|
||||
payload = Handler.require_fields(self, self.body_json(), "show_id")
|
||||
self.json(
|
||||
Handler._context(self).update_watchlist_auto_download(
|
||||
payload["show_id"],
|
||||
payload.get("mode"),
|
||||
payload.get("quality"),
|
||||
payload.get("name"),
|
||||
)
|
||||
)
|
||||
elif parsed.path == "/api/watchlist/update-all":
|
||||
Handler._runtime(self)
|
||||
result = Handler._context(self).update_all_watchlist_statuses()
|
||||
|
||||
Reference in New Issue
Block a user