Build and send a book only when it changed
A key of the chapters, rules and metadata of a story tells if its book changed. A check without a change no longer builds the book again, also for a book that waits for an upload. A held book goes out without a new build. The Rebuild button still builds and sends in each case.
This commit is contained in:
+2
-1
@@ -291,8 +291,9 @@ def delete_story(story_id: int) -> Any:
|
||||
@app.post("/api/stories/<int:story_id>/download")
|
||||
def download(story_id: int) -> Any:
|
||||
data = _json()
|
||||
# A rebuild that the user asks for also builds and sends a book that did not change.
|
||||
return orchestrator.queue_story(
|
||||
story_id, data.get("mode", DownloadMode.NEW.value), data.get("chapter_ids"), data.get("force_fields")
|
||||
story_id, data.get("mode", DownloadMode.NEW.value), data.get("chapter_ids"), data.get("force_fields"), True
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user