From ad29a34c4bbe17dc92b6cc80620fefdcdcaee5e2 Mon Sep 17 00:00:00 2001 From: SimoSbara Date: Sun, 21 Dec 2025 01:22:46 +0100 Subject: [PATCH 1/3] restore artwork crc log --- Server/Components/CustomModels/models.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/Components/CustomModels/models.cpp b/Server/Components/CustomModels/models.cpp index f431eca7c..8aaae6c39 100644 --- a/Server/Components/CustomModels/models.cpp +++ b/Server/Components/CustomModels/models.cpp @@ -623,8 +623,8 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player return false; } - // core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(txdName), txd.checksum); - // core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(dffName), dff.checksum); + core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(txdName), txd.checksum); + core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(dffName), dff.checksum); auto model = storage.emplace_back(new ModelInfo(type, id, baseId, dff, txd, virtualWorld, timeOn, timeOff)); From 34e2a6e7468fb77673de481b3c6e247a73542617 Mon Sep 17 00:00:00 2001 From: SimoSbara Date: Sun, 21 Dec 2025 14:05:31 +0100 Subject: [PATCH 2/3] add show_crc_logs variable in server config --- Server/Components/CustomModels/models.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Server/Components/CustomModels/models.cpp b/Server/Components/CustomModels/models.cpp index 8aaae6c39..6ca718fc0 100644 --- a/Server/Components/CustomModels/models.cpp +++ b/Server/Components/CustomModels/models.cpp @@ -302,6 +302,7 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player String cdn = ""; bool usingCdn = false; uint16_t httpThreads = 50; // default max_players is 50 + bool showCRCLogs; DefaultEventDispatcher eventDispatcher; @@ -418,6 +419,7 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player config.setInt("network.http_threads", httpThreads); config.setInt("artwork.port", modelsPort); config.setString("artwork.web_server_bind", webServerBindAddress); + config.setBool("artwork.show_crc_logs", showCRCLogs); } else { @@ -451,6 +453,10 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player { config.setString("artwork.web_server_bind", webServerBindAddress); } + if (config.getType("artwork.show_crc_logs") == ConfigOptionType_None) + { + config.setBool("artwork.show_crc_logs", showCRCLogs); + } } } @@ -465,6 +471,7 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player cdn = String(trim(core->getConfig().getString("artwork.cdn"))); httpThreads = *core->getConfig().getInt("network.http_threads"); webServerBindAddress = String(core->getConfig().getString("artwork.web_server_bind")); + showCRCLogs = *core->getConfig().getBool("artwork.show_crc_logs"); NetCode::RPC::RequestTXD::addEventHandler(*core, &requestDownloadLinkHandler); NetCode::RPC::RequestDFF::addEventHandler(*core, &requestDownloadLinkHandler); @@ -623,8 +630,11 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player return false; } - core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(txdName), txd.checksum); - core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(dffName), dff.checksum); + if (showCRCLogs) + { + core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(txdName), txd.checksum); + core->logLn(LogLevel::Message, "[artwork:crc] %.*s CRC = 0x%X", PRINT_VIEW(dffName), dff.checksum); + } auto model = storage.emplace_back(new ModelInfo(type, id, baseId, dff, txd, virtualWorld, timeOn, timeOff)); From 3421af4aaeebcc2e97f141668847671e28ab5a98 Mon Sep 17 00:00:00 2001 From: SimoSbara Date: Sun, 21 Dec 2025 20:37:22 +0100 Subject: [PATCH 3/3] add default value (false) to show_crc_logs --- Server/Components/CustomModels/models.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/Components/CustomModels/models.cpp b/Server/Components/CustomModels/models.cpp index 6ca718fc0..5224c1f09 100644 --- a/Server/Components/CustomModels/models.cpp +++ b/Server/Components/CustomModels/models.cpp @@ -302,7 +302,7 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player String cdn = ""; bool usingCdn = false; uint16_t httpThreads = 50; // default max_players is 50 - bool showCRCLogs; + bool showCRCLogs = false; DefaultEventDispatcher eventDispatcher;