mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[SabreTools, DatFile] Add runnable as a filterable field
This commit is contained in:
@@ -365,6 +365,8 @@ namespace SabreTools.Helper.Data
|
||||
helptext.Add(" -ngt=, --not-gtype= Exclude only games with a given type");
|
||||
helptext.Add(" Supported values are:");
|
||||
helptext.Add(" None, Bios, Device, Mechanical");
|
||||
helptext.Add(" -run, --runnable Include only items that are marked runnable");
|
||||
helptext.Add(" -nrun, --not-run Include only items that are marked unrunnable");
|
||||
helptext.Add(" -out= Output directory (overridden by --inplace)");
|
||||
helptext.Add(" -mt={4} Amount of threads to use (-1 unlimted)");
|
||||
|
||||
|
||||
@@ -1254,7 +1254,7 @@ namespace SabreTools.Helper.Dats
|
||||
xtr.GetAttribute("isdevice") == "yes" ? MachineType.Device :
|
||||
xtr.GetAttribute("ismechanical") == "yes" ? MachineType.Mechanical :
|
||||
MachineType.None,
|
||||
Runnable = xtr.GetAttribute("runnable") == "yes",
|
||||
Runnable = xtr.GetAttribute("runnable") == "yes" || xtr.GetAttribute("runnable") == null,
|
||||
};
|
||||
|
||||
if (subreader.GetAttribute("supported") != null)
|
||||
|
||||
@@ -836,6 +836,12 @@ Options:
|
||||
Exclude items with one of the supported values:
|
||||
None, Bios, Device, Mechanical
|
||||
|
||||
-run, --runnable Include only items that are marked runnable
|
||||
This allows users to include only verified runnable games
|
||||
|
||||
-nrun, --not-run Include only items that are not marked runnable
|
||||
This allows users to include only unrunnable games
|
||||
|
||||
-out= Set the name of the output directory
|
||||
This sets an output folder to be used when the files are created. If a path
|
||||
is not defined, the application directory is used instead.
|
||||
|
||||
@@ -446,6 +446,7 @@ namespace SabreTools
|
||||
/// <param name="notsha1">SHA-1 of the rom to match (can use asterisk-partials)</param>
|
||||
/// <param name="notstatus">Select roms without the given item status</param>
|
||||
/// <param name="notgametype">Select games without the given type</param>
|
||||
/// <param name="runnable">Select games with the given runability</param>
|
||||
/// /* Trimming info */
|
||||
/// <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>
|
||||
@@ -517,6 +518,7 @@ namespace SabreTools
|
||||
string notsha1,
|
||||
string notstatus,
|
||||
string notgametype,
|
||||
bool? runnable,
|
||||
|
||||
/* Trimming info */
|
||||
bool trim,
|
||||
@@ -732,7 +734,7 @@ namespace SabreTools
|
||||
|
||||
// Create the Filter object to be used
|
||||
Filter filter = new Filter(gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, itemStatus, machineType,
|
||||
notgamename, notromname, notromtype, notcrc, notmd5, notsha1, itemNotStatus, machineNotType);
|
||||
notgamename, notromname, notromtype, notcrc, notmd5, notsha1, itemNotStatus, machineNotType, runnable);
|
||||
|
||||
userInputDat.DetermineUpdateType(inputs, outDir, merge, diffMode, inplace, skip, bare, clean, softlist,
|
||||
filter, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace SabreTools
|
||||
skip = false,
|
||||
updateDat = false, // SimpleSort
|
||||
usegame = true;
|
||||
bool? runnable = null;
|
||||
DatFormat datFormat = 0x0;
|
||||
DiffMode diffMode = 0x0;
|
||||
OutputFormat outputFormat = OutputFormat.Folder;
|
||||
@@ -306,6 +307,10 @@ namespace SabreTools
|
||||
case "--noMD5":
|
||||
noMD5 = true;
|
||||
break;
|
||||
case "-nrun":
|
||||
case "--not-run":
|
||||
runnable = false;
|
||||
break;
|
||||
case "-ns":
|
||||
case "--noSHA1":
|
||||
noSHA1 = true;
|
||||
@@ -394,6 +399,10 @@ namespace SabreTools
|
||||
case "--romba":
|
||||
romba = true;
|
||||
break;
|
||||
case "-run":
|
||||
case "--runnable":
|
||||
runnable = true;
|
||||
break;
|
||||
case "-s":
|
||||
case "--short":
|
||||
shortname = true;
|
||||
@@ -1057,7 +1066,7 @@ namespace SabreTools
|
||||
superdat, forcemerge, forcend, forcepack, excludeOf, datFormat, usegame, prefix,
|
||||
postfix, quotes, repext, addext, remext, datPrefix, romba, merge, diffMode, inplace, skip, removeDateFromAutomaticName,
|
||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, status, gametype,
|
||||
notgamename, notromname, notromtype, notcrc, notmd5, notsha1, notstatus, notgametype,
|
||||
notgamename, notromname, notromtype, notcrc, notmd5, notsha1, notstatus, notgametype, runnable,
|
||||
trim, single, root, outDir, cleanGameNames, softlist, dedup, maxParallelism);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user