From 50f9a701e1de30d903f8a8aa40489aee79ef4216 Mon Sep 17 00:00:00 2001 From: Katie Paxton-Fear <36405442+InsiderPhD@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:25:15 +0000 Subject: [PATCH] Fix clang-format issues --- src/activities/browser/OpdsBookBrowserActivity.cpp | 9 +++------ src/util/UrlUtils.cpp | 8 ++++---- src/util/UrlUtils.h | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/activities/browser/OpdsBookBrowserActivity.cpp b/src/activities/browser/OpdsBookBrowserActivity.cpp index ae901512..2bd95961 100644 --- a/src/activities/browser/OpdsBookBrowserActivity.cpp +++ b/src/activities/browser/OpdsBookBrowserActivity.cpp @@ -261,9 +261,7 @@ void OpdsBookBrowserActivity::fetchFeed(const std::string& path) { return; } - std::string url = UrlUtils::buildUrlWithAuth(serverUrl, path, - SETTINGS.calibreUsername, - SETTINGS.calibrePassword); + std::string url = UrlUtils::buildUrlWithAuth(serverUrl, path, SETTINGS.calibreUsername, SETTINGS.calibrePassword); Serial.printf("[%lu] [OPDS] Fetching: %s\n", millis(), url.c_str()); std::string content; @@ -337,9 +335,8 @@ void OpdsBookBrowserActivity::downloadBook(const OpdsEntry& book) { updateRequired = true; // Build full download URL - std::string downloadUrl = UrlUtils::buildUrlWithAuth(SETTINGS.opdsServerUrl, book.href, - SETTINGS.calibreUsername, - SETTINGS.calibrePassword); + std::string downloadUrl = + UrlUtils::buildUrlWithAuth(SETTINGS.opdsServerUrl, book.href, SETTINGS.calibreUsername, SETTINGS.calibrePassword); // Create Calibre-style folder structure: /Books/AuthorName/BookName/BookFile.epub std::string authorFolder = book.author.empty() ? "Unknown Author" : StringUtils::sanitizeFilename(book.author); diff --git a/src/util/UrlUtils.cpp b/src/util/UrlUtils.cpp index 9ba4ce5d..0b34dc01 100644 --- a/src/util/UrlUtils.cpp +++ b/src/util/UrlUtils.cpp @@ -1,7 +1,7 @@ #include "UrlUtils.h" -#include #include +#include namespace UrlUtils { @@ -61,15 +61,15 @@ std::string urlEncode(const std::string& value) { return escaped.str(); } -std::string buildUrlWithAuth(const std::string& serverUrl, const std::string& path, - const std::string& username, const std::string& password) { +std::string buildUrlWithAuth(const std::string& serverUrl, const std::string& path, const std::string& username, + const std::string& password) { // If no credentials, use regular buildUrl if (username.empty() && password.empty()) { return buildUrl(serverUrl, path); } std::string urlWithProtocol = ensureProtocol(serverUrl); - + // Find protocol end const size_t protocolEnd = urlWithProtocol.find("://"); if (protocolEnd == std::string::npos) { diff --git a/src/util/UrlUtils.h b/src/util/UrlUtils.h index 961d79bc..cba56c69 100644 --- a/src/util/UrlUtils.h +++ b/src/util/UrlUtils.h @@ -30,7 +30,7 @@ std::string urlEncode(const std::string& value); * If username and password are provided, adds them to the URL. * Example: https://username:password@example.com/path */ -std::string buildUrlWithAuth(const std::string& serverUrl, const std::string& path, - const std::string& username, const std::string& password); +std::string buildUrlWithAuth(const std::string& serverUrl, const std::string& path, const std::string& username, + const std::string& password); } // namespace UrlUtils