diff --git a/RR3CommunityServer/Data/RR3DbContext.cs b/RR3CommunityServer/Data/RR3DbContext.cs index 8d6ac48..97b398b 100644 --- a/RR3CommunityServer/Data/RR3DbContext.cs +++ b/RR3CommunityServer/Data/RR3DbContext.cs @@ -381,16 +381,18 @@ public class GameAsset public string? EaCdnPath { get; set; } // Local storage - public string LocalPath { get; set; } = string.Empty; + public string? LocalPath { get; set; } public long FileSize { get; set; } - public string FileSha256 { get; set; } = string.Empty; + public string? FileSha256 { get; set; } public string? Version { get; set; } // Metadata public DateTime DownloadedAt { get; set; } = DateTime.UtcNow; + public DateTime UploadedAt { get; set; } = DateTime.UtcNow; public DateTime LastAccessedAt { get; set; } = DateTime.UtcNow; public int AccessCount { get; set; } = 0; public bool IsAvailable { get; set; } = true; + public bool IsRequired { get; set; } = false; // Game-specific (optional) public string? CarId { get; set; } @@ -398,6 +400,7 @@ public class GameAsset public string Category { get; set; } = "misc"; // models, textures, audio, etc. public long? CompressedSize { get; set; } public string? Md5Hash { get; set; } + public string? Description { get; set; } // Custom content support public bool IsCustomContent { get; set; } diff --git a/RR3CommunityServer/Pages/Assets.cshtml b/RR3CommunityServer/Pages/Assets.cshtml new file mode 100644 index 0000000..27b35d1 --- /dev/null +++ b/RR3CommunityServer/Pages/Assets.cshtml @@ -0,0 +1,321 @@ +@page +@model RR3CommunityServer.Pages.AssetsModel +@{ + ViewData["Title"] = "Asset Management"; +} + +
Upload and manage game assets for client downloads
+Total Assets
+Available
+Total Size
+Downloads
+| File Name | +EA CDN Path | +Category | +Type | +Size | +MD5 | +Downloads | +Required | +Actions | +
|---|---|---|---|---|---|---|---|---|
|
+ @asset.FileName
+ @if (!string.IsNullOrEmpty(asset.Description))
+ {
+ @asset.Description + } + |
+ @asset.EaCdnPath |
+ @asset.Category | +@asset.AssetType | +@FormatFileSize(asset.FileSize) | +
+ @(asset.Md5Hash?.Substring(0, 8) ?? "N/A")...
+ @if (!string.IsNullOrEmpty(asset.Md5Hash))
+ {
+
+ }
+ |
+ @asset.AccessCount | ++ @if (asset.IsRequired) + { + Required + } + else + { + Optional + } + | +
+
+
+
+
+
+
+ |
+
GET /content/api/manifestGET /content/api/[asset-path] for missing files/external/storage/apk/ directory{
+ "resultCode": 0,
+ "message": "Success",
+ "data": [
+ {
+ "path": "/rr3/base/game_data.pak",
+ "md5": "a1b2c3d4e5f6...",
+ "compressedSize": 1048576,
+ "uncompressedSize": 2097152,
+ "category": "base"
+ }
+ ]
+}
+
+ EAM-SESSION - Session UUIDEAM-USER-ID - User identifierEA-SELL-ID - Marketplace (e.g., GOOGLE_PLAY)SDK-VERSION - Nimble SDK version