From cffe624ebc9686f2e17c0e69f0d90c50273f1d35 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 12 Sep 2016 21:30:10 -0700 Subject: [PATCH] [SabreTools] Copy init from SimpleSort to inits --- SabreTools/Partials/SabreTools_Inits.cs | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/SabreTools/Partials/SabreTools_Inits.cs b/SabreTools/Partials/SabreTools_Inits.cs index c4637a59..26723c66 100644 --- a/SabreTools/Partials/SabreTools_Inits.cs +++ b/SabreTools/Partials/SabreTools_Inits.cs @@ -385,6 +385,38 @@ namespace SabreTools } } + /// + /// Wrap sorting files using an input DAT + /// + /// Names of the DATs to compare against + /// List of input files/folders to check + /// Output directory to use to build to + /// Temporary directory for archive extraction + /// True to enable external scanning of archives, false otherwise + /// Integer representing the archive handling level for 7z + /// True if files should be output to folder, false otherwise + /// True if output directory should be checked instead of rebuilt to, false otherwise + /// True if files should be output in TorrentGZ format, false for standard zip + /// True if files should be output in Romba depot folders, false otherwise + /// Integer representing the archive handling level for GZip + /// Integer representing the archive handling level for RAR + /// Integer representing the archive handling level for Zip + /// True if the updated DAT should be output, false otherwise + /// Logger object for file and console output + private static void InitSimpleSort(List datfiles, List inputs, string outdir, string tempdir, bool quickScan, + bool toFolder, bool verify, bool tgz, bool romba, int sevenzip, int gz, int rar, int zip, bool updateDat, Logger logger) + { + // Add all of the input DATs into one huge internal DAT + Dat datdata = new Dat(); + foreach (string datfile in datfiles) + { + datdata = DatTools.Parse(datfile, 99, 99, datdata, logger); + } + + SimpleSort ss = new SimpleSort(datdata, inputs, outdir, tempdir, quickScan, toFolder, verify, tgz, romba, sevenzip, gz, rar, zip, updateDat, logger); + ss.StartProcessing(); + } + /// /// Wrap getting statistics on a DAT or folder of DATs ///