mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, ArchiveTools] TODO cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user