mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 08:55:58 +08:00
Downloader URL check
This commit is contained in:
parent
3438b5184e
commit
02d5ad9d8c
@ -146,14 +146,15 @@ void Downloader::start_download(const std::string& full_url)
|
|||||||
#else
|
#else
|
||||||
std::string escaped_url = FileGet::escape_url(full_url.substr(24));
|
std::string escaped_url = FileGet::escape_url(full_url.substr(24));
|
||||||
#endif
|
#endif
|
||||||
// TODO: enable after testing
|
|
||||||
/*
|
if (!boost::starts_with(escaped_url, "https://files.printables.com") && !boost::starts_with(escaped_url, "https://dev-files.printables.com")) {
|
||||||
if (!boost::starts_with(escaped_url, "https://media.printables.com/")) {
|
std::string msg = format(_L("Download won't start. Download URL doesn't point to https://files.printables.com : %1%"), escaped_url);
|
||||||
BOOST_LOG_TRIVIAL(error) << "Download won't start. Download URL doesn't point to https://media.printables.com : " << escaped_url;
|
BOOST_LOG_TRIVIAL(error) << msg;
|
||||||
// TODO: show error?
|
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
|
||||||
|
ntf_mngr->push_notification(NotificationType::CustomNotification, NotificationManager::NotificationLevel::RegularNotificationLevel, msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
std::string text(escaped_url);
|
std::string text(escaped_url);
|
||||||
m_downloads.emplace_back(std::make_unique<Download>(id, std::move(escaped_url), this, m_dest_folder));
|
m_downloads.emplace_back(std::make_unique<Download>(id, std::move(escaped_url), this, m_dest_folder));
|
||||||
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
|
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user