mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add RecalculateStats passthrough
This commit is contained in:
@@ -301,6 +301,19 @@ namespace SabreTools.DatFiles
|
||||
|
||||
#endregion
|
||||
|
||||
#region Item Dictionary Passthrough - Bucketing
|
||||
|
||||
/// <summary>
|
||||
/// Recalculate the statistics for the Dat
|
||||
/// </summary>
|
||||
public void RecalculateStats()
|
||||
{
|
||||
Items.RecalculateStats();
|
||||
ItemsDB.RecalculateStats();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Parsing
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace SabreTools.DatTools
|
||||
long romCount = datFile.DatStatistics.GetItemCount(ItemType.Rom);
|
||||
|
||||
if (diskCount + mediaCount + romCount == 0)
|
||||
datFile.Items.RecalculateStats();
|
||||
datFile.RecalculateStats();
|
||||
|
||||
datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
|
||||
@@ -214,8 +214,7 @@ namespace SabreTools.DatTools
|
||||
private static bool HasWritable(DatFile datFile)
|
||||
{
|
||||
// Force a statistics recheck, just in case
|
||||
datFile.Items.RecalculateStats();
|
||||
datFile.ItemsDB.RecalculateStats();
|
||||
datFile.RecalculateStats();
|
||||
|
||||
// If there's nothing there, abort
|
||||
if (datFile.DatStatistics.TotalCount == 0)
|
||||
|
||||
Reference in New Issue
Block a user