Skip to content

Commit 96d0c7b

Browse files
v2.00.4
1 parent d0f47c3 commit 96d0c7b

File tree

12 files changed

+330
-117
lines changed

12 files changed

+330
-117
lines changed

changelog.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
# 2.00.4
2+
3+
* Added another level of language selection fallback if you have a language order
4+
specified. If Retool finds none of the languages it's looking for in your language
5+
order when it compares titles, its next step is to check the language order derived from
6+
your region order.
7+
8+
This is most beneficial for European titles when you're filtering by a language, and
9+
want to _preference_ but not _filter_ by other languages. You might want to do this when
10+
you want a title that was released in a specific country, but due to No-Intro and Redump
11+
naming rules gets assigned to the Europe region.
12+
13+
For example, if a DAT file has the following titles:
14+
15+
* _Example Title (Europe) (En,Fr,De,It)_
16+
* _Example Title (Europe) (En,Es,Pt)_
17+
18+
And you have the following region order:
19+
20+
1. Europe
21+
1. Spain
22+
1. Portugal
23+
1. France
24+
25+
And you filter by English and no other language, Retool used to choose
26+
_Example Title (Europe) (En,Fr,De,It)_, as it contains English (the only language you
27+
specified in your language priority) and has the most languages.
28+
29+
But given your region order, you've expressed a clear preference for Spanish and
30+
Portuguese above French.
31+
32+
Now because of the new region order language fallback, the language order effectively
33+
becomes:
34+
35+
1. English (explicity in the language filter, and also the implied language for Europe)
36+
1. Spanish
37+
1. Portuguese
38+
1. French
39+
40+
You still only get titles that support English because of the filter, however this means
41+
that Retool now selects _Example Title (Europe) (En,Es,Pt)_ instead of
42+
_Example Title (Europe) (En,Fr,De,It)_.
43+
44+
* Added granularity back to the kept/removed list. Instead of filing every user exclusion
45+
under "category removes", Retool now categorizes under individual exclusions like
46+
"application", "audio", "bad dump" and so on.
47+
48+
* Made heading underlines in the kept/removed list variable depending on heading length.
49+
50+
* Fixed an index heading in the kept/removed list that incorrectly had "system excludes"
51+
instead of "global excludes".
52+
53+
* Made some minor GUI tweaks for consistency.
54+
155
# 2.00.3
256

357
* Due to the influx of pirate ROMs in the No-Intro NES DAT, pirate ROMs are now treated

docs/changelog.md

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,84 @@ hide:
55

66
# Changelog
77

8-
# 2.00.2
8+
## 2.00.4
9+
10+
* Added another level of language selection fallback if you have a language order
11+
specified. If Retool finds none of the languages it's looking for in your language
12+
order when it compares titles, its next step is to check the language order derived from
13+
your region order.
14+
15+
This is most beneficial for European titles when you're filtering by a language, and
16+
want to _preference_ but not _filter_ by other languages. You might want to do this when
17+
you want a title that was released in a specific country, but due to No-Intro and Redump
18+
naming rules gets assigned to the Europe region.
19+
20+
For example, if a DAT file has the following titles:
21+
22+
* _Example Title (Europe) (En,Fr,De,It)_
23+
* _Example Title (Europe) (En,Es,Pt)_
24+
25+
And you have the following region order:
26+
27+
1. Europe
28+
1. Spain
29+
1. Portugal
30+
1. France
31+
32+
And you filter by English and no other language, Retool used to choose
33+
_Example Title (Europe) (En,Fr,De,It)_, as it contains English (the only language you
34+
specified in your language priority) and has the most languages.
35+
36+
But given your region order, you've expressed a clear preference for Spanish and
37+
Portuguese above French.
38+
39+
Now because of the new region order language fallback, the language order effectively
40+
becomes:
41+
42+
1. English (explicity in the language filter, and also the implied language for Europe)
43+
1. Spanish
44+
1. Portuguese
45+
1. French
46+
47+
You still only get titles that support English because of the filter, however this means
48+
that Retool now selects _Example Title (Europe) (En,Es,Pt)_ instead of
49+
_Example Title (Europe) (En,Fr,De,It)_.
50+
51+
* Added granularity back to the kept/removed list. Instead of filing every user exclusion
52+
under "category removes", Retool now categorizes under individual exclusions like
53+
"application", "audio", "bad dump" and so on.
54+
55+
* Made heading underlines in the kept/removed list variable depending on heading length.
56+
57+
* Fixed an index heading in the kept/removed list that incorrectly had "system excludes"
58+
instead of "global excludes".
59+
60+
* Made some minor GUI tweaks for consistency.
61+
62+
63+
## 2.00.3
64+
65+
* Due to the influx of pirate ROMs in the No-Intro NES DAT, pirate ROMs are now treated
66+
like bad dumps. That is, they are demoted below licensed variations of games, even if
67+
the pirate ROM is in a preferred language and the licensed version isn't.
68+
69+
70+
## 2.00.2
971

1072
* Expanded support for some newer No-Intro DATs.
1173

1274

13-
# 2.00.1
75+
## 2.00.1
1476

1577
* Expanded the demo regex to incorporate a set of Genesis demos.
1678

1779

18-
# 2.00.0
80+
## 2.00.0
1981

2082
* Fixed grouping of titles with oddly-named video standards in the filename.
2183

2284

23-
# 2.00.0 Beta 9
85+
## 2.00.0 Beta 9
2486

2587
* Fixed conditional override priorities not working.
2688

docs/includes/file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[retool-2.00.3-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.00.3-win-x86-64.zip)
1+
[retool-2.00.4-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.00.4-win-x86-64.zip)

docs/includes/sha256.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9b5d4d4de577e52c90c8409355c7ae2be068e1df00b7ded46e1add705570abef
1+
ced97dc724ceb0112395c6d713abd886c9f7dab8d1f8d4971641794cd166193f

modules/chooseparent.py

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -613,18 +613,14 @@ def choose_language(title_set: set[DatNode], config: Config, report_on_match: bo
613613
# Check if a system config is in play
614614
language_order: list[str] = []
615615

616-
for region in config.region_order_user:
617-
language_order.extend(config.languages_filter[region])
618-
619-
# Make sure language entries are unique
620-
language_order = reduce(lambda x,y: x + [y] if not y in x else x, language_order, [])
621-
622616
if config.languages_filter:
623617
language_order = config.language_order_user
624618

625619
if config.system_language_order_user:
626620
if {'override': 'true'} in config.system_language_order_user:
627621
language_order = [str(x) for x in config.system_language_order_user if 'override' not in x]
622+
else:
623+
language_order = config.region_order_languages_user
628624

629625
# Select titles based on language
630626
remove_titles: set[DatNode] = set()
@@ -675,8 +671,38 @@ def choose_language(title_set: set[DatNode], config: Config, report_on_match: bo
675671
break
676672

677673
if not language_found:
678-
# Cycle through implied language order
674+
if config.languages_filter:
675+
# Cycle through implied languages from region order as the first fallback
676+
for language in config.region_order_languages_user:
677+
if (
678+
re.search(language, ','.join(title_1.languages))
679+
and not re.search(language, ','.join(title_2.languages))):
680+
if title_2 in title_set:
681+
if report_on_match:
682+
TraceTools.trace_title('REF0097', [', '.join(config.region_order_languages_user)])
683+
TraceTools.trace_title('', [f'{Font.italic}({",".join(title_1.languages) + ")":<30}{Font.end} [{title_1.short_name}] {title_1.full_name}', f'{Font.italic}({",".join(title_2.languages) + ")":<30}{Font.end}{Font.disabled} [{title_2.short_name}] {title_2.full_name}{Font.end}'], keep_remove=True)
684+
685+
remove_titles.add(title_2)
686+
language_found = True
687+
break
688+
elif (
689+
re.search(language, ','.join(title_2.languages))
690+
and not re.search(language, ','.join(title_1.languages))):
691+
if title_1 in title_set:
692+
if report_on_match:
693+
TraceTools.trace_title('REF0098', [', '.join(list(config.region_order_languages_user))])
694+
TraceTools.trace_title('', [f'{Font.italic}({",".join(title_2.languages) + ")":<30}{Font.end} [{title_2.short_name}] {title_2.full_name}', f'{Font.italic}({",".join(title_1.languages) + ")":<30}{Font.end}{Font.disabled} [{title_1.short_name}] {title_1.full_name}{Font.end}'], keep_remove=True)
695+
696+
remove_titles.add(title_1)
697+
language_found = True
698+
break
699+
700+
if not language_found:
701+
# Cycle through implied languages from the default region order as the second fallback
679702
implied_languages: list[str] = [x[0] for x in config.languages_implied.values()]
703+
704+
# Make sure language entries are unique
705+
implied_languages = reduce(lambda x,y: x + [y] if not y in x else x, implied_languages, [])
680706
for language in implied_languages:
681707
if (
682708
re.search(language, ','.join(title_1.languages))
@@ -702,7 +728,7 @@ def choose_language(title_set: set[DatNode], config: Config, report_on_match: bo
702728
break
703729

704730
if not language_found:
705-
# Choose the title with more languages
731+
# Choose the title with more languages as the third fallback
706732
if len(title_1.languages) > len (title_2.languages):
707733
if report_on_match: TraceTools.trace_title('REF0081', [title_1.full_name, title_2.full_name], set(), keep_remove=True)
708734
if title_2 in title_set:
@@ -1459,7 +1485,7 @@ def detect_parent_clone_clash(processed_titles: dict[str, set[DatNode]], config:
14591485
for key, values in parent_clash.items():
14601486
if values['assigned_clone']:
14611487
eprint(f'\n{Font.warning}* {Font.warning_bold}{key}{Font.warning} should be a parent, but is set as a clone of\n {Font.warning_bold}{values["assigned_clone"]}{Font.warning}{Font.end}')
1462-
eprint(f'\n {Font.warning}This likely isn\'t an issue, and just a side effect of region and language settings.{Font.end}')
1488+
eprint(f'\n {Font.warning}Sometimes this can happen because there\'s a duplicate entry in the clone list.\nOther times it\'s just a side effect of region and language settings.{Font.end}')
14631489

14641490
if values['clones']:
14651491
eprint(f'\n {Font.warning}Titles that have {Font.warning_bold}{key}{Font.warning} as a parent:{Font.end}\n')
@@ -1696,18 +1722,14 @@ def choose_parent_process(config: Config, potential_parents: dict[str, set[DatNo
16961722
# Check if a system config is in play
16971723
language_order: list[str] = []
16981724

1699-
for region in config.region_order_user:
1700-
language_order.extend(config.languages_filter[region])
1701-
1702-
# Make sure language entries are unique
1703-
language_order = reduce(lambda x,y: x + [y] if not y in x else x, language_order, [])
1704-
17051725
if config.languages_filter:
17061726
language_order = config.language_order_user
17071727

17081728
if config.system_language_order_user:
17091729
if {'override': 'true'} in config.system_language_order_user:
17101730
language_order = [str(x) for x in config.system_language_order_user if 'override' not in x]
1731+
else:
1732+
language_order = config.region_order_languages_user
17111733

17121734
region_order: list[str] = config.region_order_user
17131735

modules/config.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ def key_missing(section_key: str) -> None:
326326
first_run_gui=first_run_gui)
327327

328328
# Import the user config file
329+
self.region_order_languages_user: list[str] = []
329330
self.language_order_user: list[str] = []
330331
self.languages_user_found: bool = False
331332
self.region_order_user: list[str] = []
@@ -365,16 +366,18 @@ def key_missing(section_key: str) -> None:
365366
if user_config.data[user_gui_settings_key]:
366367
self.user_gui_settings = user_config.data[user_gui_settings_key]
367368

368-
# Change the user languages list to be regex strings instead of language
369-
# names
369+
# Get the language order as determined by user regions and user languages, change
370+
# the user languages list to be regex strings instead of language names
371+
for region in self.region_order_user:
372+
self.region_order_languages_user.extend(self.languages_filter[region])
373+
374+
# Make sure language entries are unique
375+
self.region_order_languages_user = reduce(lambda x,y: x + [y] if not y in x else x, self.region_order_languages_user, [])
376+
370377
language_list: list[str] = []
371378

372379
if not self.language_order_user:
373-
for region in self.region_order_user:
374-
language_list.extend(self.languages_filter[region])
375-
376-
# Make sure language entries are unique
377-
language_list = reduce(lambda x,y: x + [y] if not y in x else x, language_list, [])
380+
language_list = self.region_order_languages_user
378381
else:
379382
self.languages_user_found = True
380383

modules/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Set the user files and options
22
VERSION_MAJOR: str = '2.00'
3-
VERSION_MINOR: str = '3'
3+
VERSION_MINOR: str = '4'
44
CLONE_LIST_METADATA_DOWNLOAD_LOCATION: str = 'https://raw.githubusercontent.com/unexpectedpanda/retool-clonelists-metadata/main'
55
CLONE_LIST_METADATA_DOWNLOAD_LOCATION_KEY: str = 'cloneListMetadataUrl'
66
PROGRAM_DOWNLOAD_LOCATION: str = 'https://raw.githubusercontent.com/unexpectedpanda/retool/main'

modules/dats.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,18 +354,14 @@ def category_assign(regexes: tuple[Any, ...], category: str) -> None:
354354
# Check if a system config is in play
355355
language_order: list[str] = []
356356

357-
for region in config.region_order_user:
358-
language_order.extend(config.languages_filter[region])
359-
360-
# Make sure language entries are unique
361-
language_order = reduce(lambda x,y: x + [y] if not y in x else x, language_order, [])
362-
363357
if config.languages_filter:
364358
language_order = config.language_order_user
365359

366360
if config.system_language_order_user:
367361
if {'override': 'true'} in config.system_language_order_user:
368362
language_order = [str(x) for x in config.system_language_order_user if 'override' not in x]
363+
else:
364+
language_order = config.region_order_languages_user
369365

370366
region_order: list[str] = config.region_order_user
371367
if config.system_region_order_user:

modules/gui/retool_ui.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,7 +2438,7 @@ def setupUi(self, MainWindow):
24382438
self.scrollAreaSystemOptions.setWidgetResizable(True)
24392439
self.layoutScrollAreaSystemOptions = QWidget()
24402440
self.layoutScrollAreaSystemOptions.setObjectName(u"layoutScrollAreaSystemOptions")
2441-
self.layoutScrollAreaSystemOptions.setGeometry(QRect(0, 0, 422, 725))
2441+
self.layoutScrollAreaSystemOptions.setGeometry(QRect(0, 0, 573, 725))
24422442
sizePolicy5.setHeightForWidth(self.layoutScrollAreaSystemOptions.sizePolicy().hasHeightForWidth())
24432443
self.layoutScrollAreaSystemOptions.setSizePolicy(sizePolicy5)
24442444
self.verticalLayout_22 = QVBoxLayout(self.layoutScrollAreaSystemOptions)
@@ -2702,6 +2702,7 @@ def setupUi(self, MainWindow):
27022702
self.tabSystemUserFilters.setObjectName(u"tabSystemUserFilters")
27032703
self.verticalLayout_4 = QVBoxLayout(self.tabSystemUserFilters)
27042704
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
2705+
self.verticalLayout_4.setContentsMargins(-1, -1, 9, 9)
27052706
self.scrollAreaSystemUserFilters = QScrollArea(self.tabSystemUserFilters)
27062707
self.scrollAreaSystemUserFilters.setObjectName(u"scrollAreaSystemUserFilters")
27072708
self.scrollAreaSystemUserFilters.setFocusPolicy(Qt.NoFocus)
@@ -2712,12 +2713,12 @@ def setupUi(self, MainWindow):
27122713
self.scrollAreaSystemUserFilters.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignVCenter)
27132714
self.scrollAreaWidgetContentsSystemUserFilters = QWidget()
27142715
self.scrollAreaWidgetContentsSystemUserFilters.setObjectName(u"scrollAreaWidgetContentsSystemUserFilters")
2715-
self.scrollAreaWidgetContentsSystemUserFilters.setGeometry(QRect(0, 0, 182, 553))
2716+
self.scrollAreaWidgetContentsSystemUserFilters.setGeometry(QRect(0, 0, 590, 393))
27162717
self.scrollAreaWidgetContentsSystemUserFilters.setMinimumSize(QSize(0, 0))
27172718
self.gridLayoutSystemUserFilters = QGridLayout(self.scrollAreaWidgetContentsSystemUserFilters)
27182719
self.gridLayoutSystemUserFilters.setObjectName(u"gridLayoutSystemUserFilters")
27192720
self.gridLayoutSystemUserFilters.setSizeConstraint(QLayout.SetMinimumSize)
2720-
self.gridLayoutSystemUserFilters.setContentsMargins(0, 0, 18, 10)
2721+
self.gridLayoutSystemUserFilters.setContentsMargins(0, 0, 0, 10)
27212722
self.textEditSystemInclude = CustomTextEdit(self.scrollAreaWidgetContentsSystemUserFilters)
27222723
self.textEditSystemInclude.setObjectName(u"textEditSystemInclude")
27232724
sizePolicy.setHeightForWidth(self.textEditSystemInclude.sizePolicy().hasHeightForWidth())
@@ -3419,7 +3420,7 @@ def retranslateUi(self, MainWindow):
34193420
"that lists what titles have been kept, and what\n"
34203421
"titles have been removed", None))
34213422
#endif // QT_CONFIG(tooltip)
3422-
self.checkBoxGlobalOptionsKeepRemove.setText(QCoreApplication.translate("MainWindow", u"Also output lists of what titles have been kept and removed", None))
3423+
self.checkBoxGlobalOptionsKeepRemove.setText(QCoreApplication.translate("MainWindow", u"Also output a list of what titles have been kept and removed", None))
34233424
#if QT_CONFIG(tooltip)
34243425
self.checkBoxGlobalOptions1G1RNames.setToolTip(QCoreApplication.translate("MainWindow", u"In addition to the output DAT file, produce a TXT file that lists only\n"
34253426
"the name of each title in the output DAT file, and optionally add a prefix\n"
@@ -3780,7 +3781,7 @@ def retranslateUi(self, MainWindow):
37803781
"that lists what titles have been kept, and what\n"
37813782
"titles have been removed", None))
37823783
#endif // QT_CONFIG(tooltip)
3783-
self.checkBoxSystemOptionsKeepRemove.setText(QCoreApplication.translate("MainWindow", u"Also output lists of what titles have been kept and removed", None))
3784+
self.checkBoxSystemOptionsKeepRemove.setText(QCoreApplication.translate("MainWindow", u"Also output a list of what titles have been kept and removed", None))
37843785
#if QT_CONFIG(tooltip)
37853786
self.checkBoxSystemOptions1G1RNames.setToolTip(QCoreApplication.translate("MainWindow", u"In addition to the output DAT file, produce a TXT file that lists only\n"
37863787
"the name of each title in the output DAT file, and optionally add a prefix\n"

0 commit comments

Comments
 (0)