mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Handle most places where source was being set for IDDB
This commit is contained in:
@@ -313,7 +313,7 @@ namespace SabreTools.DatTools
|
||||
|
||||
foreach ((long, DatItem) datItem in datItems)
|
||||
{
|
||||
var dupes = datFile.ItemsDB.GetDuplicates(datItem.Item2, sorted: true);
|
||||
var dupes = datFile.ItemsDB.GetDuplicates(datItem, sorted: true);
|
||||
if (datItem.Item2.Clone() is not DatItem newDatItem)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -579,7 +579,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="inverse">True if the DAT should be used as a filter instead of a template, false otherwise</param>
|
||||
/// <param name="dupes">Output list of duplicate items to rebuild to</param>
|
||||
/// <returns>True if the item should be rebuilt, false otherwise</returns>
|
||||
private static bool ShouldRebuildDB(DatFile datFile, DatItem datItem, Stream? stream, bool inverse, out ConcurrentList<(long, DatItem)> dupes)
|
||||
private static bool ShouldRebuildDB(DatFile datFile, (long, DatItem) datItem, Stream? stream, bool inverse, out ConcurrentList<(long, DatItem)> dupes)
|
||||
{
|
||||
// Find if the file has duplicates in the DAT
|
||||
dupes = datFile.ItemsDB.GetDuplicates(datItem);
|
||||
|
||||
@@ -182,8 +182,8 @@ namespace SabreTools.DatTools
|
||||
continue;
|
||||
|
||||
// Now we want to remove all duplicates from the DAT
|
||||
datFile.ItemsDB.GetDuplicates(new Rom(fileinfo))
|
||||
.AddRange(datFile.ItemsDB.GetDuplicates(new Disk(fileinfo)));
|
||||
datFile.ItemsDB.GetDuplicates((-1, new Rom(fileinfo)))
|
||||
.AddRange(datFile.ItemsDB.GetDuplicates((-1, new Disk(fileinfo))));
|
||||
}
|
||||
|
||||
watch.Stop();
|
||||
|
||||
Reference in New Issue
Block a user