Added Project ID parsing for epic games#63
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds logic to parse Epic Games' project IDs from log requests and differentiate between builds and non-matching cases.
- Added parsing of the URL from the Request to extract the Project ID when the URL path contains "Builds".
- Throws an exception if the URL format does not match expected patterns.
DeveLanCacheUI_Backend/LogReading/Models/LanCacheLogEntryRaw.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Can you maybe add some comments in the code what it's doing in what steps with some examples. Because I don't use epic myself atm so don't really have good examples to test this with. Also the examples you mentioned that don't work still have fornite in them, so we could just grab that entry in a list splitted by / right? I'm not sure what you meant that it wouldn't work for those. |
|
We could do that, yes. I mean, that the code I submitted currently checks for "Builds" and thus does not match on "ias". Somewhat noteworth: The capitalization of the CodeName is different between "Builds"-URLs and "ias"-URLs Epic Download URLs look like this: Epic Patch/Update URLs are a bit different (as can be seen in the first post) I might also, that the bounds check CoPilot suggested should also be added to the SteamID-Parser. The code I wrote does this: // Get the URL part from the http request line "GET <url> HTTP/1.1"
var urlPart = Request.Split(' ')[1];
// Split URL by '/'
var splittedUrl = urlPart.Split('/');
// Check that first subdirectory is "Builds". (Might need that additional case for updates to match for 'ias'
if (splittedUrl[1] == "Builds")
{
// Next Subdirectory is thus the ProjectID/GameName
DownloadIdentifier = splittedUrl[2];
}
// If not in Builds throw the Exception like in Steam parsing
else
{
throw new InvalidOperationException($"Could not parse epicgamesProjectID from {Request}");
} |
|
I'm trying to figure out it I can somehow run the GitHub actions stuff on this PR so we get a BETA build. I'm reading some stuff here but can't find it yet: |
|
I installed EPIC games and downloaded a few games: Sadly for a lot of the games I don't really see identifiers that we can use to identify the game. I guess we could detect individual game downloads but for the games itself we'd need a mapping of some sorts. |
|
I found some things, when a game starts downloading it first downloads a manifest file: Someone wrote a parser that can parse the data out of this: Using this parser I can read this data: Using this I should be able to grab the game name. I'll think about this some more and might implement this in the future. |
|
I'll close this PR in favor of some things I'm currently working on: |

At the very least we can now differentiate between the games that are downloaded, and for quite a few games that Project ID is almost equal to the game name (e.g. Fortnite=Fortnite, Kisima Ingitchuna=Kisima Ingitchuna (Never Alone)), but unfortunately an increasing number of games on epic just uses a hex-hash.
Still more info than before.
I have no idea, how you want non matching lines to be handles, so I just copied the steam on. Non-matching can look like this (non exhaustive):