mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add code to check for SHA-1 only situations with proper sorting
This commit is contained in:
@@ -582,15 +582,31 @@ namespace SabreTools.Helper
|
||||
{
|
||||
if (x.MD5 == y.MD5)
|
||||
{
|
||||
if (x.SystemID == y.SystemID)
|
||||
// If the MD5 is blank, use SHA1 before SystemID
|
||||
if (x.MD5 == "")
|
||||
{
|
||||
if (x.SourceID == y.SourceID)
|
||||
if (x.SHA1 == y.SHA1)
|
||||
{
|
||||
return String.Compare(x.SHA1, y.SHA1);
|
||||
if (x.SystemID == y.SystemID)
|
||||
{
|
||||
return x.SourceID - y.SourceID;
|
||||
}
|
||||
return x.SystemID - y.SystemID;
|
||||
}
|
||||
return x.SourceID - y.SourceID;
|
||||
return String.Compare(x.SHA1, y.SHA1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x.SystemID == y.SystemID)
|
||||
{
|
||||
if (x.SourceID == y.SourceID)
|
||||
{
|
||||
return String.Compare(x.SHA1, y.SHA1);
|
||||
}
|
||||
return x.SourceID - y.SourceID;
|
||||
}
|
||||
return x.SystemID - y.SystemID;
|
||||
}
|
||||
return x.SystemID - y.SystemID;
|
||||
}
|
||||
return String.Compare(x.MD5, y.MD5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user