diff --git a/Xbox/Catalog.cs b/Xbox/Catalog.cs index 1ab3a6a..9b4c58b 100644 --- a/Xbox/Catalog.cs +++ b/Xbox/Catalog.cs @@ -5,7 +5,6 @@ namespace SabreTools.Models.Xbox /// /// Contains metadata information about XboxOne and XboxSX discs /// Stored in a JSON file on the disc at /MSXC/Metadata/catalog.js - /// TODO: Check for unknown fields or values in more catalog.js files /// [JsonObject] public class Catalog @@ -50,7 +49,7 @@ namespace SabreTools.Models.Xbox /// Package details for the bundle itself /// Known fields used: ProductID, XboxProductID, /// OneStoreProductID, Titles, VUI, Images - /// Known Versions Present: 2.0, 4.0 + /// Known Versions Present: 2.0, 2.1, 4.0 /// [JsonProperty("bundle", NullValueHandling = NullValueHandling.Ignore)] public Package? Bundle { get; set; } @@ -60,7 +59,7 @@ namespace SabreTools.Models.Xbox /// Package name to use as launch package /// Before 4.0, object=Package with only ContentID filled /// For 4.0 onwards, object=String, representing filename - /// Known Versions Present: 2.0, 4.0 + /// Known Versions Present: 2.0, 2.1, 4.0 /// [JsonProperty("launchPackage", NullValueHandling = NullValueHandling.Ignore)] public object? LaunchPackage { get; set; } @@ -68,7 +67,7 @@ namespace SabreTools.Models.Xbox /// /// "packages": /// Package details for each package on disc - /// Known Versions Present: 2.1, 4.0 + /// Known Versions Present: 2.0, 2.1, 4.0 /// [JsonProperty("packages")] public Package[]? Packages { get; set; } @@ -81,5 +80,94 @@ namespace SabreTools.Models.Xbox /// [JsonProperty("siblings", NullValueHandling = NullValueHandling.Ignore)] public string[][]? Siblings { get; set; } + + #region v1.0 only + + // The below fields are usually present in a Package sub-field + // but for v1.0 catalog.js files, they are at the root Catalog object + + /// + /// "productId": + /// Hex identifier for package Product ID + /// Known Versions Present: 1.0 + /// Exists within Packages[].ProductID for v2.0 onwards + /// + [JsonProperty("productId", NullValueHandling = NullValueHandling.Ignore)] + public string? ProductID { get; set; } + + /// + /// "contentId": + /// Hex content identifier + /// Known Versions present: 1.0 + /// Exists within Packages[].ContentID for v2.0 onwards + /// + [JsonProperty("contentId", NullValueHandling = NullValueHandling.Ignore)] + public string? ContentID { get; set; } + + /// + /// "titleId": + /// 8 hex character package Title ID + /// Known Versions Present: 1.0 + /// Exists within Packages[].TitleID for v2.0 onwards + /// + [JsonProperty("titleId", NullValueHandling = NullValueHandling.Ignore)] + public string? TitleID { get; set; } + + /// + /// "titles" + /// List of name of package for each locale + /// Known Versions Present: 1.0 + /// Exists within Packages[].Titles for v2.0 onwards + /// + [JsonProperty("titles", NullValueHandling = NullValueHandling.Ignore)] + public Title[]? Titles { get; set; } + + /// + /// "vui": + /// List of Voice User Interface packages titles for each locale + /// Known Versions Present: 1.0 + /// Exists within Packages[].VUI for v2.0 onwards + /// + [JsonProperty("vui", NullValueHandling = NullValueHandling.Ignore)] + public Title[]? VUI { get; set; } + + /// + /// "images": + /// List of paths to each image in MSXC/Metadata// + /// Known Versions Present: 1.0 + /// Exists within Packages[].Images for v2.0 onwards + /// + [JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)] + public Image[]? Images { get; set; } + + /// + /// "ratings": + /// List of package age ratings for each relevant rating system + /// Known Versions Present: 1.0 + /// Exists within Packages[].Ratings for v2.0 onwards + /// + [JsonProperty("ratings", NullValueHandling = NullValueHandling.Ignore)] + public Rating[]? Ratings { get; set; } + + /// + /// "size": + /// Size of package in bytes + /// Known Versions Present: 1.0 + /// Exists within Packages[].Size for v2.0 onwards + /// + [JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)] + public long? Size { get; set; } + + /// + /// "type": + /// Package Type + /// Known values: "Game" (Game package), "Durable" (DLC package) + /// Known Versions Present: 1.0 + /// Exists within Packages[].Type for v2.0 onwards + /// + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public string? Type { get; set; } + + #endregion } } diff --git a/Xbox/Package..cs b/Xbox/Package.cs similarity index 100% rename from Xbox/Package..cs rename to Xbox/Package.cs