From 2cb93a62738f7246287c30be4200cd91a751f026 Mon Sep 17 00:00:00 2001 From: Pingger Shikkoken Date: Sun, 20 Apr 2025 18:59:56 +0200 Subject: [PATCH 1/2] Added Project ID parsing for epic games --- .../LogReading/Models/LanCacheLogEntryRaw.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs b/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs index 5b006e9..6e21332 100644 --- a/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs +++ b/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs @@ -69,7 +69,16 @@ public void CalculateFields() } else if (CacheIdentifier == "epicgames") { - DownloadIdentifier = "unknown"; + var urlPart = Request.Split(' ')[1]; + var splittedUrl = urlPart.Split('/'); + if (splittedUrl[1] == "Builds") + { + DownloadIdentifier = splittedUrl[2]; + } + else + { + throw new InvalidOperationException($"Could not parse epicgamesProjectID from {Request}"); + } } else if (CacheIdentifier == "riot") { From da68dd9d54a107d7a2293c49d87b382d103cab1e Mon Sep 17 00:00:00 2001 From: Devedse <2350015+devedse@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:52:47 +0200 Subject: [PATCH 2/2] Update DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../LogReading/Models/LanCacheLogEntryRaw.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs b/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs index 6e21332..269fe24 100644 --- a/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs +++ b/DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs @@ -71,13 +71,13 @@ public void CalculateFields() { var urlPart = Request.Split(' ')[1]; var splittedUrl = urlPart.Split('/'); - if (splittedUrl[1] == "Builds") + if (splittedUrl.Length >= 3 && splittedUrl[1] == "Builds") { DownloadIdentifier = splittedUrl[2]; } else { - throw new InvalidOperationException($"Could not parse epicgamesProjectID from {Request}"); + throw new InvalidOperationException($"Could not parse epicgamesProjectID from {Request}. URL part: {urlPart}"); } } else if (CacheIdentifier == "riot")