feat: add post-download prompt with open book / back to listing options

After an OPDS download completes, show a prompt screen instead of
immediately returning to the catalog. The user can choose to open the
book for reading or go back to the listing. A live countdown (5s, fast
refresh) auto-selects the configured default; any button press cancels
the timer. A per-server "After Download" setting controls the default
action (back to listing for backward compatibility).

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-02 15:27:53 -05:00
parent f955cf2fb4
commit 7eaced602f
8 changed files with 127 additions and 11 deletions

View File

@@ -83,6 +83,7 @@ bool OpdsServerStore::saveToFile() const {
obj["password_obf"] = obfuscateToBase64(server.password);
obj["download_path"] = server.downloadPath;
obj["sort_order"] = server.sortOrder;
obj["after_download"] = server.afterDownloadAction;
}
String json;
@@ -119,6 +120,7 @@ bool OpdsServerStore::loadFromFile() {
}
server.downloadPath = obj["download_path"] | std::string("/");
server.sortOrder = obj["sort_order"] | 0;
server.afterDownloadAction = obj["after_download"] | 0;
if (server.sortOrder == 0) needsResave = true;
servers.push_back(std::move(server));
}