mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
FIX: error log reduce
Change-Id: I836ba41eefb3a8c12a57a22d208ee7d60140e345
This commit is contained in:
@@ -208,6 +208,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
||||
if (machine == m_machine)
|
||||
return;
|
||||
m_machine = machine;
|
||||
m_last_errors.clear();
|
||||
auto fs = m_image_grid->GetFileSystem();
|
||||
if (fs) {
|
||||
m_image_grid->SetFileSystem(nullptr);
|
||||
@@ -265,7 +266,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
||||
if (e.GetInt() == PrinterFileSystem::Initializing)
|
||||
fetchUrl(boost::weak_ptr(fs));
|
||||
|
||||
if (status == PrinterFileSystem::Failed
|
||||
if ((status == PrinterFileSystem::Failed && m_last_errors.find(fs->GetLastError()) == m_last_errors.end())
|
||||
|| status == PrinterFileSystem::ListReady) {
|
||||
json j;
|
||||
j["code"] = fs->GetLastError();
|
||||
@@ -281,6 +282,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
||||
if (agent)
|
||||
agent->track_event("download_video_conn", j.dump());
|
||||
}
|
||||
m_last_errors.insert(fs->GetLastError());
|
||||
}
|
||||
});
|
||||
fs->Bind(EVT_DOWNLOAD, [this, wfs = boost::weak_ptr(fs)](auto& e) {
|
||||
|
||||
Reference in New Issue
Block a user