fix: use correct server name for opds download
This commit is contained in:
@@ -398,7 +398,7 @@ void OpdsBookBrowserActivity::chooseBookFormat(const OpdsEntry& book) {
|
|||||||
|
|
||||||
selectedBookIndex = selectorIndex;
|
selectedBookIndex = selectorIndex;
|
||||||
formatSelectorIndex = 0;
|
formatSelectorIndex = 0;
|
||||||
formatSelectionLabels = buildOpdsFormatSelectionLabels(book.acquisitionLinks, SETTINGS.opdsServerUrl);
|
formatSelectionLabels = buildOpdsFormatSelectionLabels(book.acquisitionLinks, server.url);
|
||||||
state = BrowserState::FORMAT_SELECTION;
|
state = BrowserState::FORMAT_SELECTION;
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
}
|
}
|
||||||
@@ -413,7 +413,7 @@ void OpdsBookBrowserActivity::downloadBook(const OpdsEntry& book, const OpdsAcqu
|
|||||||
|
|
||||||
std::string downloadUrl = (acquisition.href.rfind("http", 0) == 0)
|
std::string downloadUrl = (acquisition.href.rfind("http", 0) == 0)
|
||||||
? acquisition.href
|
? acquisition.href
|
||||||
: UrlUtils::buildUrl(SETTINGS.opdsServerUrl, acquisition.href);
|
: UrlUtils::buildUrl(server.url, acquisition.href);
|
||||||
std::string filename = "/" +
|
std::string filename = "/" +
|
||||||
StringUtils::sanitizeFilename((book.author.empty() ? "" : book.author + " - ") + book.title) +
|
StringUtils::sanitizeFilename((book.author.empty() ? "" : book.author + " - ") + book.title) +
|
||||||
acquisition.fileExtension;
|
acquisition.fileExtension;
|
||||||
|
|||||||
Reference in New Issue
Block a user