Add asset management system

- Created Assets.cshtml and Assets.cshtml.cs for admin panel
- Upload assets with MD5/SHA256 hash calculation
- Generate asset manifests in RR3 format (tab-separated)
- Integrated with Nimble SDK asset download system
- Updated GameAsset model with IsRequired, UploadedAt, Description
- Added navigation link in _Layout.cshtml
- Supports categories: base, cars, tracks, audio, textures, UI, DLC
- Asset download endpoint at /content/api/{assetPath}
- Manifest endpoint at /content/api/manifest

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-19 15:16:43 -08:00
parent e03c1d9856
commit 5d2c3bf880
4 changed files with 625 additions and 2 deletions

View File

@@ -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; }