mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Rely on bucket key helpers
This commit is contained in:
@@ -736,7 +736,7 @@ namespace SabreTools.DatFiles
|
|||||||
BucketBy(GetBestAvailable(), DedupeType.None);
|
BucketBy(GetBestAvailable(), DedupeType.None);
|
||||||
|
|
||||||
// Now that we have the sorted type, we get the proper key
|
// Now that we have the sorted type, we get the proper key
|
||||||
return datItem.GetKey(_bucketedBy);
|
return GetBucketKey(datItem, _bucketedBy, lower: true, norename: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -943,10 +943,7 @@ namespace SabreTools.DatFiles
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
var source = GetSourceForItem(itemIndex);
|
var source = GetSourceForItem(itemIndex);
|
||||||
string sourceKeyPadded = source.Value?.Index.ToString().PadLeft(10, '0') + '-';
|
|
||||||
|
|
||||||
var machine = GetMachineForItem(itemIndex);
|
var machine = GetMachineForItem(itemIndex);
|
||||||
string machineName = machine.Value?.GetStringFieldValue(Models.Metadata.Machine.NameKey) ?? "Default";
|
|
||||||
|
|
||||||
// Treat NULL like machine
|
// Treat NULL like machine
|
||||||
if (bucketBy == ItemKey.NULL)
|
if (bucketBy == ItemKey.NULL)
|
||||||
@@ -1188,9 +1185,7 @@ namespace SabreTools.DatFiles
|
|||||||
BucketBy(GetBestAvailable(), DedupeType.None);
|
BucketBy(GetBestAvailable(), DedupeType.None);
|
||||||
|
|
||||||
// Now that we have the sorted type, we get the proper key
|
// Now that we have the sorted type, we get the proper key
|
||||||
var machine = GetMachineForItem(datItem.Key);
|
return GetBucketKey(datItem.Key, _bucketedBy, lower: true, norename: true);
|
||||||
var source = GetSourceForItem(datItem.Key);
|
|
||||||
return datItem.Value.GetKeyDB(_bucketedBy, machine.Value, source.Value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user