Experimental flip of values

This commit is contained in:
Matt Nadareski
2016-05-13 15:43:26 -07:00
parent 081e1a04ea
commit 1b3cbf6796

View File

@@ -575,17 +575,17 @@ namespace SabreTools.Helper
{ {
if (x.Size == y.Size) if (x.Size == y.Size)
{ {
if (x.CRC == y.CRC) if (x.SHA1 == y.SHA1)
{ {
// If the CRC is blank, use MD5 before SystemID // If the SHA1 is blank, use MD5 before SystemID
if (x.CRC == "") if (x.SHA1 == "")
{ {
if (x.MD5 == y.MD5) if (x.MD5 == y.MD5)
{ {
// If the MD5 is blank, use SHA1 before SystemID // If the MD5 is blank, use CRC before SystemID
if (x.MD5 == "") if (x.MD5 == "")
{ {
if (x.SHA1 == y.SHA1) if (x.CRC == y.CRC)
{ {
if (x.SystemID == y.SystemID) if (x.SystemID == y.SystemID)
{ {
@@ -593,7 +593,7 @@ namespace SabreTools.Helper
} }
return x.SystemID - y.SystemID; return x.SystemID - y.SystemID;
} }
return String.Compare(x.SHA1, y.SHA1); return String.Compare(x.CRC, y.CRC);
} }
else else
{ {
@@ -601,7 +601,7 @@ namespace SabreTools.Helper
{ {
if (x.SourceID == y.SourceID) if (x.SourceID == y.SourceID)
{ {
return String.Compare(x.SHA1, y.SHA1); return String.Compare(x.CRC, y.CRC);
} }
return x.SourceID - y.SourceID; return x.SourceID - y.SourceID;
} }
@@ -618,7 +618,7 @@ namespace SabreTools.Helper
{ {
if (x.MD5 == y.MD5) if (x.MD5 == y.MD5)
{ {
return String.Compare(x.SHA1, y.SHA1); return String.Compare(x.CRC, y.CRC);
} }
return String.Compare(x.MD5, y.MD5); return String.Compare(x.MD5, y.MD5);
} }
@@ -626,9 +626,8 @@ namespace SabreTools.Helper
} }
return x.SystemID - y.SystemID; return x.SystemID - y.SystemID;
} }
} }
return String.Compare(x.CRC, y.CRC); return String.Compare(x.SHA1, y.SHA1);
} }
return (int)(x.Size - y.Size); return (int)(x.Size - y.Size);
}); });