mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Remapping] Clean up how remappings are handled
This commit is contained in:
@@ -294,7 +294,7 @@ COMMIT;";
|
||||
if (Regex.IsMatch(filename, Constants.NonGoodPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.NonGoodPattern).Groups;
|
||||
if (!Remapping.NonGood.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["NonGood"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as NonGood but could not be mapped.");
|
||||
return source;
|
||||
@@ -304,7 +304,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.NonGoodSpecialPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.NonGoodSpecialPattern).Groups;
|
||||
if (!Remapping.NonGood.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["NonGood"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as NonGood but could not be mapped.");
|
||||
return source;
|
||||
@@ -314,7 +314,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.GoodPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.GoodPattern).Groups;
|
||||
if (!Remapping.Good.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["Good"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as Good but could not be mapped.");
|
||||
return source;
|
||||
@@ -324,7 +324,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.GoodXmlPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.GoodXmlPattern).Groups;
|
||||
if (!Remapping.Good.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["Good"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as Good but could not be mapped.");
|
||||
return source;
|
||||
@@ -334,7 +334,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.MaybeIntroPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.MaybeIntroPattern).Groups;
|
||||
if (!Remapping.MaybeIntro.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["MaybeIntro"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as Maybe-Intro but could not be mapped.");
|
||||
return source;
|
||||
@@ -344,7 +344,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.NoIntroPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.NoIntroPattern).Groups;
|
||||
if (!Remapping.NoIntro.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["NoIntro"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as No-Intro but could not be mapped.");
|
||||
return source;
|
||||
@@ -355,7 +355,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.NoIntroNumberedPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.NoIntroNumberedPattern).Groups;
|
||||
if (!Remapping.NoIntro.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["NoIntro"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as No-Intro but could not be mapped.");
|
||||
return source;
|
||||
@@ -366,7 +366,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.NoIntroSpecialPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.NoIntroSpecialPattern).Groups;
|
||||
if (!Remapping.NoIntro.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["NoIntro"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as No-Intro but could not be mapped.");
|
||||
return source;
|
||||
@@ -376,7 +376,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.RedumpPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.RedumpPattern).Groups;
|
||||
if (!Remapping.Redump.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["Redump"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as Redump but could not be mapped.");
|
||||
return source;
|
||||
@@ -387,7 +387,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.RedumpBiosPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.RedumpBiosPattern).Groups;
|
||||
if (!Remapping.Redump.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["Redump"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as Redump but could not be mapped.");
|
||||
return source;
|
||||
@@ -397,16 +397,16 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.TosecPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.TosecPattern).Groups;
|
||||
if (!Remapping.TOSEC.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["TOSEC"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
// Handle special case mappings found only in TOSEC
|
||||
fileinfo = Regex.Match(filename, Constants.TosecSpecialPatternA).Groups;
|
||||
|
||||
if (!Remapping.TOSEC.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["TOSEC"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.TosecSpecialPatternB).Groups;
|
||||
|
||||
if (!Remapping.TOSEC.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["TOSEC"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as TOSEC but could not be mapped.");
|
||||
return source;
|
||||
@@ -418,7 +418,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.TruripPattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.TruripPattern).Groups;
|
||||
if (!Remapping.TruRip.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["TruRip"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as TruRip but could not be mapped.");
|
||||
return source;
|
||||
@@ -442,7 +442,7 @@ COMMIT;";
|
||||
else if (Regex.IsMatch(filename, Constants.MamePattern))
|
||||
{
|
||||
fileinfo = Regex.Match(filename, Constants.MamePattern).Groups;
|
||||
if (!Remapping.MAME.ContainsKey(fileinfo[1].Value))
|
||||
if (!Remapping.DatMaps["MAME"].ContainsKey(fileinfo[1].Value))
|
||||
{
|
||||
_logger.Warning("The filename " + fileinfo[1].Value + " was matched as MAME but could not be mapped.");
|
||||
return source;
|
||||
|
||||
Reference in New Issue
Block a user