fix: use same file name as KOReader for OPDS downloads

This re-instates the functionality of commit efae9c0, which was blown away by later changes.
This commit is contained in:
spfenwick
2026-04-29 19:50:11 +12:00
parent 6df7418e58
commit b81d1102e7
@@ -415,7 +415,7 @@ void OpdsBookBrowserActivity::downloadBook(const OpdsEntry& book, const OpdsAcqu
? acquisition.href ? acquisition.href
: UrlUtils::buildUrl(SETTINGS.opdsServerUrl, acquisition.href); : UrlUtils::buildUrl(SETTINGS.opdsServerUrl, acquisition.href);
std::string filename = "/" + std::string filename = "/" +
StringUtils::sanitizeFilename(book.title + (book.author.empty() ? "" : " - " + book.author)) + StringUtils::sanitizeFilename((book.author.empty() ? "" : book.author + " - ") + book.title) +
acquisition.fileExtension; acquisition.fileExtension;
LOG_DBG("OPDS", "Downloading: %s -> %s", downloadUrl.c_str(), filename.c_str()); LOG_DBG("OPDS", "Downloading: %s -> %s", downloadUrl.c_str(), filename.c_str());