diff --git a/src/slic3r/Utils/CrealityPrint.cpp b/src/slic3r/Utils/CrealityPrint.cpp index 772e1da80e..ec980cee98 100644 --- a/src/slic3r/Utils/CrealityPrint.cpp +++ b/src/slic3r/Utils/CrealityPrint.cpp @@ -298,36 +298,6 @@ std::string CrealityPrint::query_boxes_info() const } } -std::string CrealityPrint::get_print_host_webui(DynamicPrintConfig* config) -{ - // K-series printers (K2 / K2 Plus / K2 Pro) ship with Mainsail on port 4408. - // Port 80 hosts only the Creality control / upload API, which returns 404 - // for unknown paths and therefore renders as a blank/404 page in Orca's - // Device WebView. Default to the Mainsail URL when the user hasn't - // explicitly set print_host_webui. - if (config == nullptr) - return {}; - - std::string explicit_url = config->opt_string("print_host_webui"); - if (!explicit_url.empty()) - return explicit_url; - - std::string host = config->opt_string("print_host"); - if (host.empty()) - return {}; - - if (boost::algorithm::istarts_with(host, "http://")) - host = host.substr(7); - else if (boost::algorithm::istarts_with(host, "https://")) - host = host.substr(8); - if (auto slash = host.find('/'); slash != std::string::npos) - host = host.substr(0, slash); - if (auto colon = host.find(':'); colon != std::string::npos) - host = host.substr(0, colon); - - return "http://" + host + ":4408/"; -} - bool CrealityPrint::start_print(wxString &msg, const std::string &filename, const std::map& extended_info) const { try { diff --git a/src/slic3r/Utils/CrealityPrint.hpp b/src/slic3r/Utils/CrealityPrint.hpp index 7a3728dce6..ddb2054420 100644 --- a/src/slic3r/Utils/CrealityPrint.hpp +++ b/src/slic3r/Utils/CrealityPrint.hpp @@ -34,10 +34,6 @@ public: std::string query_boxes_info() const; std::string model_name() const; - // Mainsail on K-series printers listens on port 4408. Use that as the - // default Device-tab WebView URL when the user has not set print_host_webui. - static std::string get_print_host_webui(DynamicPrintConfig *config); - protected: virtual void set_auth(Http& http) const; private: diff --git a/src/slic3r/Utils/PrintHost.cpp b/src/slic3r/Utils/PrintHost.cpp index 68720c0b9c..7f69d5e087 100644 --- a/src/slic3r/Utils/PrintHost.cpp +++ b/src/slic3r/Utils/PrintHost.cpp @@ -92,10 +92,6 @@ std::string PrintHost::get_print_host_webui(DynamicPrintConfig* config) webui_url = ElegooLink::get_print_host_webui(config); break; } - case htCrealityPrint: { - webui_url = CrealityPrint::get_print_host_webui(config); - break; - } default: break; }