mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[RombaSharp] Add the flag for Rescan
This commit is contained in:
@@ -73,6 +73,7 @@ namespace SabreTools
|
|||||||
build = false,
|
build = false,
|
||||||
copy = false,
|
copy = false,
|
||||||
dbstats = false,
|
dbstats = false,
|
||||||
|
depotRescan = false,
|
||||||
diffdat = false,
|
diffdat = false,
|
||||||
dir2dat = false,
|
dir2dat = false,
|
||||||
export = false,
|
export = false,
|
||||||
@@ -112,6 +113,9 @@ namespace SabreTools
|
|||||||
case "dbstats":
|
case "dbstats":
|
||||||
dbstats = true;
|
dbstats = true;
|
||||||
break;
|
break;
|
||||||
|
case "depot-rescan":
|
||||||
|
depotRescan = true;
|
||||||
|
break;
|
||||||
case "diffdat":
|
case "diffdat":
|
||||||
diffdat = true;
|
diffdat = true;
|
||||||
break;
|
break;
|
||||||
@@ -180,8 +184,8 @@ namespace SabreTools
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If more than one switch is enabled, show the help screen
|
// If more than one switch is enabled, show the help screen
|
||||||
if (!(archive ^ build ^ dbstats ^ diffdat ^ dir2dat ^ export ^ fixdat ^ lookup ^ memstats ^
|
if (!(archive ^ build ^ dbstats ^ depotRescan ^ diffdat ^ dir2dat ^ export ^ fixdat ^ lookup ^
|
||||||
miss ^ progress ^ purgeBackup ^ purgeDelete ^ refreshDats ^ shutdown))
|
memstats ^ miss ^ progress ^ purgeBackup ^ purgeDelete ^ refreshDats ^ shutdown))
|
||||||
{
|
{
|
||||||
_logger.Error("Only one feature switch is allowed at a time");
|
_logger.Error("Only one feature switch is allowed at a time");
|
||||||
Build.Help();
|
Build.Help();
|
||||||
@@ -190,7 +194,7 @@ namespace SabreTools
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If a switch that requires a filename is set and no file is, show the help screen
|
// If a switch that requires a filename is set and no file is, show the help screen
|
||||||
if (inputs.Count == 0 && (archive || build || dir2dat || fixdat || lookup || miss))
|
if (inputs.Count == 0 && (archive || build || depotRescan || dir2dat || fixdat || lookup || miss))
|
||||||
{
|
{
|
||||||
_logger.Error("This feature requires at least one input");
|
_logger.Error("This feature requires at least one input");
|
||||||
Build.Help();
|
Build.Help();
|
||||||
@@ -218,6 +222,15 @@ namespace SabreTools
|
|||||||
DisplayDBStats();
|
DisplayDBStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rescan a specific depot
|
||||||
|
else if (depotRescan)
|
||||||
|
{
|
||||||
|
foreach (string input in inputs)
|
||||||
|
{
|
||||||
|
Rescan(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Creates a DAT file with those entries that are in new DAT
|
// Creates a DAT file with those entries that are in new DAT
|
||||||
else if (diffdat)
|
else if (diffdat)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ namespace SabreTools.Helper
|
|||||||
helptext.Add(" build For each specified DAT file it creates TZip files");
|
helptext.Add(" build For each specified DAT file it creates TZip files");
|
||||||
helptext.Add(" -copy Copy files instead of rebuilding");
|
helptext.Add(" -copy Copy files instead of rebuilding");
|
||||||
helptext.Add(" dbstats Prints db stats");
|
helptext.Add(" dbstats Prints db stats");
|
||||||
|
helptext.Add(" depot-rescan Rescan a specific depot to get new information");
|
||||||
helptext.Add(" diffdat Creates a DAT file for entries found in the new DAT");
|
helptext.Add(" diffdat Creates a DAT file for entries found in the new DAT");
|
||||||
helptext.Add(" -new= DAT to compare to");
|
helptext.Add(" -new= DAT to compare to");
|
||||||
helptext.Add(" dir2dat Creates a DAT file for the specified input directory");
|
helptext.Add(" dir2dat Creates a DAT file for the specified input directory");
|
||||||
|
|||||||
Reference in New Issue
Block a user