mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] More instance methods, MORE!
This commit is contained in:
@@ -63,7 +63,7 @@ namespace SabreTools
|
||||
Name = Path.GetFileName(inputs[0]) + " Dir2Dat",
|
||||
Description = Path.GetFileName(inputs[0]) + " Dir2Dat",
|
||||
OutputFormat = OutputFormat.Xml,
|
||||
Files = new Dictionary<string, List<DatItem>>(),
|
||||
Files = new SortedDictionary<string, List<DatItem>>(),
|
||||
};
|
||||
|
||||
Logger logger = new Logger(false, "");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -76,7 +76,7 @@ namespace SabreTools.Helper
|
||||
_cursorLeft = Console.CursorLeft;
|
||||
_matched = new DatFile
|
||||
{
|
||||
Files = new Dictionary<string, List<DatItem>>(),
|
||||
Files = new SortedDictionary<string, List<DatItem>>(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace SabreTools.Helper
|
||||
|
||||
// Setup the fixdat
|
||||
_matched = (DatFile)_datdata.CloneHeader();
|
||||
_matched.Files = new Dictionary<string, List<DatItem>>();
|
||||
_matched.Files = new SortedDictionary<string, List<DatItem>>();
|
||||
_matched.FileName = "fixDat_" + _matched.FileName;
|
||||
_matched.Name = "fixDat_" + _matched.Name;
|
||||
_matched.Description = "fixDat_" + _matched.Description;
|
||||
@@ -341,7 +341,7 @@ namespace SabreTools.Helper
|
||||
_logger.User("Getting source file information...");
|
||||
DatFile matchdat = new DatFile
|
||||
{
|
||||
Files = new Dictionary<string, List<DatItem>>(),
|
||||
Files = new SortedDictionary<string, List<DatItem>>(),
|
||||
};
|
||||
foreach (string file in files)
|
||||
{
|
||||
@@ -427,7 +427,7 @@ namespace SabreTools.Helper
|
||||
}
|
||||
|
||||
// Then bucket the keys by game for better output
|
||||
SortedDictionary<string, List<DatItem>> keysByGame = DatFile.BucketByGame(toFromMap.Keys.ToList(), false, true, _logger);
|
||||
SortedDictionary<string, List<DatItem>> keysByGame = DatFile.BucketListByGame(toFromMap.Keys.ToList(), false, true, _logger);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace SabreTools
|
||||
OutputFormat = (outputFormat == 0 ? OutputFormat.Xml : outputFormat),
|
||||
Romba = romba,
|
||||
Type = (superdat ? "SuperDAT" : ""),
|
||||
Files = new Dictionary<string, List<DatItem>>(),
|
||||
Files = new SortedDictionary<string, List<DatItem>>(),
|
||||
};
|
||||
|
||||
// For each input directory, create a DAT
|
||||
@@ -118,7 +118,7 @@ namespace SabreTools
|
||||
{
|
||||
// Clone the base Dat for information
|
||||
DatFile datdata = (DatFile)basedat.Clone();
|
||||
datdata.Files = new Dictionary<string, List<DatItem>>();
|
||||
datdata.Files = new SortedDictionary<string, List<DatItem>>();
|
||||
|
||||
string basePath = Path.GetFullPath(path);
|
||||
bool success = datdata.PopulateDatFromDir(basePath, noMD5, noSHA1, bare, archivesAsFiles, enableGzip, addBlanks, addDate, tempDir, copyFiles, maxDegreeOfParallelism, _logger);
|
||||
@@ -569,7 +569,7 @@ namespace SabreTools
|
||||
XSV = tsv,
|
||||
};
|
||||
|
||||
DatFile.Update(inputs, userInputDat, outputFormat, outDir, merge, diffMode, cascade, inplace, skip, bare, clean, softlist,
|
||||
userInputDat.Update(inputs, outDir, merge, diffMode, cascade, inplace, skip, bare, clean, softlist,
|
||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, itemStatus, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user