[DatFile, ArchiveTools] TODO cleanup

This commit is contained in:
Matt Nadareski
2017-03-16 23:55:08 -07:00
parent 850821fb85
commit 2d5d9b74e7
6 changed files with 14 additions and 19 deletions

View File

@@ -581,9 +581,6 @@ namespace SabreTools.Helper.Dats
/// </summary>
/// <param name="infiles">List of File objects representing the roms to be merged</param>
/// <returns>A List of RomData objects representing the renamed roms</returns>
/// <remarks>
/// TODO: Eventually, we want this to use the CRC/MD5/SHA-1 of relavent items instead of just _1
/// </remarks>
public static List<DatItem> ResolveNames(List<DatItem> infiles)
{
// Create the output list
@@ -623,16 +620,24 @@ namespace SabreTools.Helper.Dats
if (datItem.Type == ItemType.Disk)
{
Disk disk = (Disk)datItem;
disk.Name += "_" + (!String.IsNullOrEmpty(disk.MD5) ? disk.MD5 : disk.SHA1);
disk.Name += "_" + (!String.IsNullOrEmpty(disk.MD5)
? disk.MD5
: !String.IsNullOrEmpty(disk.SHA1)
? disk.SHA1
: "1");
datItem = disk;
lastrenamed = lastrenamed ?? datItem.Name;
}
else if (datItem.Type == ItemType.Rom)
{
Rom rom = (Rom)datItem;
rom.Name += "_" + (!String.IsNullOrEmpty(rom.CRC) ? rom.CRC :
!String.IsNullOrEmpty(rom.MD5) ? rom.MD5 :
!String.IsNullOrEmpty(rom.SHA1) ? rom.SHA1 : "(alt)");
rom.Name += "_" + (!String.IsNullOrEmpty(rom.CRC)
? rom.CRC
: !String.IsNullOrEmpty(rom.MD5)
? rom.MD5
: !String.IsNullOrEmpty(rom.SHA1)
? rom.SHA1
: "1");
datItem = rom;
lastrenamed = lastrenamed ?? datItem.Name;
}

View File

@@ -38,9 +38,6 @@ namespace SabreTools.Helper.Dats
/// <param name="trim">True if we are supposed to trim names to NTFS length, false otherwise</param>
/// <param name="single">True if all games should be replaced by '!', false otherwise</param>
/// <param name="root">String representing root directory to compare against for length calculation</param>
/// <remarks>
/// TODO: Folder-wise output for update (similar to level-split)
/// </remarks>
public void DetermineUpdateType(List<string> inputPaths, string outDir, bool merge, DiffMode diff, bool inplace, bool skip,
bool bare, bool clean, bool descAsName, Filter filter, SplitType splitType, bool trim, bool single, string root)
{

View File

@@ -1271,7 +1271,7 @@ namespace SabreTools.Helper.Dats
/// <param name="descAsName">True if SL XML names should be kept, false otherwise (default)</param>
/// <remrks>
/// TODO: Software Lists - sharedfeat tag (read-in, write-out)
/// TODO: If updating softlists, is it possible to update cloneof/romof/sampleof tags as well?
/// TODO: If replacing name with description, is it possible to update cloneof/romof/sampleof tags as well?
/// </remrks>
private void ParseGenericXML(
// Standard Dat parsing

View File

@@ -19,9 +19,6 @@ using Stream = System.IO.Stream;
namespace SabreTools.Helper.Dats
{
/*
* TODO: Delete flags - Remove files from archive if only some are used (rebuild to TZip)
*/
public partial class DatFile
{
#region Rebuilding and Verifying [MODULAR DONE, FOR NOW]

View File

@@ -20,11 +20,7 @@ namespace SabreTools.Helper.Dats
/*
* TODO: Make output standard width (HTML, without making the entire thing a table)
* TODO: Multithreading? Either StringBuilder or locking
* TODO: Deduped size?
* TODO: Sort by size?
* TODO: Fix alignment for stats output (text)
* TODO: Add compressed size (10-50% of total file size based on averages)
* TODO: Add "gain" based on compressed compared to total size
*/
public partial class DatFile
{

View File

@@ -2482,7 +2482,7 @@ namespace SabreTools.Helper.Tools
File.Move(tempFile, archiveFileName);
// Now make the file TXZ
// TODO: Add ACTUAL T7Z compatible code
// TODO: Add ACTUAL TXZ compatible code (based on T7z)
BinaryWriter bw = new BinaryWriter(FileTools.TryOpenReadWrite(archiveFileName));
bw.Seek(0, SeekOrigin.Begin);