@@ -644,14 +644,14 @@ def __init__(self, LANGUAGES: str) -> None:
644644 self .sega_panasonic_ring_code : Pattern [str ] = re .compile ('\\ ((?:(?:[0-9]{1,2}[ABCMRS],? ?)*|R[E]?[-]?[0-9]*)\\ )' )
645645
646646 # Video standards
647- self .mpal_1 : Pattern [str ] = re .compile ('( -)?[( ]MPAL[ \\ )] ' )
648- self .ntsc_1 : Pattern [str ] = re .compile ('( -)?[( ]NTSC[ \\ )] ' )
647+ self .mpal_1 : Pattern [str ] = re .compile ('(?: -)?[( ]MPAL\\ )? ' )
648+ self .ntsc_1 : Pattern [str ] = re .compile ('(?: -)?[( ]NTSC\\ )? ' )
649649 self .ntsc_2 : Pattern [str ] = re .compile ('\\ [(.*)?NTSC(.*)?\\ ]' )
650650 self .ntsc_pal : Pattern [str ] = re .compile ('[( ]NTSC-PAL(\\ ))?' )
651- self .pal_1 : Pattern [str ] = re .compile ('( -)?[( ]PAL(?: [a-zA-Z]+| 50Hz )?(?:\\ )| (?=\\ ())' )
651+ self .pal_1 : Pattern [str ] = re .compile ('( -)?[( ]PAL(?: [a-zA-Z]+| 50[Hh]z )?(?:\\ )? | (?=\\ ())' )
652652 self .pal_2 : Pattern [str ] = re .compile ('\\ [(.*)?PAL(?!P)(.*)?\\ ]' )
653- self .pal_60 : Pattern [str ] = re .compile ('\\ (PAL 60Hz \\ )' )
654- self .secam_1 : Pattern [str ] = re .compile ('( -)?[( ]SECAM[ \\ )] ' )
653+ self .pal_60 : Pattern [str ] = re .compile ('\\ (PAL 60[Hh]z \\ )' )
654+ self .secam_1 : Pattern [str ] = re .compile ('(?: -)?[( ]SECAM\\ )? ' )
655655 self .secam_2 : Pattern [str ] = re .compile ('\\ [(.*)?SECAM(.*)?\\ ]' )
656656
657657 # Other tags
@@ -1112,6 +1112,23 @@ def get_group_name(name: str, config: Config) -> str:
11121112 if re .search (config .regex .version_non_parens , name ):
11131113 name = re .sub (config .regex .version_non_parens , '' , name )
11141114
1115+ # Video standard compensation
1116+ for pattern in config .regex .ntsc :
1117+ if re .search (pattern , name ):
1118+ name = re .sub (pattern , '' , name )
1119+
1120+ for pattern in config .regex .pal :
1121+ if re .search (pattern , name ):
1122+ name = re .sub (pattern , '' , name )
1123+
1124+ for pattern in config .regex .pal_60hz :
1125+ if re .search (pattern , name ):
1126+ name = re .sub (pattern , '' , name )
1127+
1128+ for pattern in config .regex .secam :
1129+ if re .search (pattern , name ):
1130+ name = re .sub (pattern , '' , name )
1131+
11151132 return name .lower ().replace (' ' , ' ' ).strip ()
11161133
11171134
@@ -1277,7 +1294,7 @@ def trace_title(trace_reference: str, variable: list[str] = [], title_set: set[D
12771294 if trace_reference == 'REF0006' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after handling special editions:'
12781295 if trace_reference == 'REF0007' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after handling versions and revisions:'
12791296 if trace_reference == 'REF0008' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after handling modern title rips:'
1280- if trace_reference == 'REF0009' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after choosing dates :'
1297+ if trace_reference == 'REF0009' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after choosing video standard :'
12811298 if trace_reference == 'REF0010' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after choosing good, original versions over alternatives:'
12821299 if trace_reference == 'REF0011' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after handling promotions and demotions:'
12831300 if trace_reference == 'REF0012' : message = f'{ Font .bold } [{ variable [0 ]} ]{ Font .end } Group after handling "Made in" titles:'
0 commit comments