Skip to content

Commit 8b3f339

Browse files
v2.01.2
1 parent d99af62 commit 8b3f339

File tree

15 files changed

+173
-63
lines changed

15 files changed

+173
-63
lines changed

changelog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Retool changelog
22

3+
4+
## 2.01.2
5+
6+
- Fixed a bug where an empty system language list fell back to a global language list
7+
instead of using all languages.
8+
- Fixed a bug that crashed Retool when a trace string was entered in the global settings,
9+
the **Options** tab was set to override in the system settings, and no system-level
10+
trace string was entered.
11+
- Added a PlayStation Vita disc ID regex to automate one stage of choosing between Vita
12+
titles.
13+
- Added a few more demo regexes to identify different demo types.
14+
- When Redump or No-Intro forgot to add the `(Demo)` tag to a title's full name but added
15+
a category of `Demos`, Retool would append `(Demo)` to the full, short, tag-free, and
16+
region-free names to avoid confusion with the full version of the title.
17+
18+
This lead to strange situations in clone lists where a title like
19+
`Example Title (USA) (Trial)` had a short name of `Example Title (Trial) (Demo)`. This
20+
behavior also wasn't taken into account for Retool GUI's title tools, making clone list
21+
updating harder than it needed to be for contributors.
22+
23+
Now a `(Demo)` tag is only added if a title doesn't contain any of a collection of
24+
demo regexes, making short names more predictable to deal with.
25+
- The title tool now has a checkbox for when a title has a DAT category of `Demos`, which
26+
can affect how a title's names are generated.
27+
28+
329
## 2.01.1
430

531
Looks like post filters needed a little more testing before release. The feature now
@@ -14,6 +40,7 @@ works properly.
1440
such a title was meant to be filtered out, it could randomly turn up in the output DAT
1541
due to the way compilations work.
1642

43+
1744
## 2.01.0
1845

1946
- The **Games** title type is now an option for exclusion. Retool assume titles without
@@ -63,6 +90,7 @@ works properly.
6390
checks the output of multiple different configurations, verifies the output is
6491
consistent, and makes it easier to pick up errors as a result of code changes.
6592

93+
6694
## 2.00.5
6795

6896
- Fixed handling of No-Intro's quasi-RFC 3339 date format.
@@ -122,12 +150,14 @@ works properly.
122150

123151
- Made some minor GUI tweaks for consistency.
124152

153+
125154
## 2.00.3
126155

127156
- Due to the influx of pirate ROMs in the No-Intro NES DAT, pirate ROMs are now treated
128157
like bad dumps. That is, they are demoted below licensed variations of games, even if
129158
the pirate ROM is in a preferred language and the licensed version isn't.
130159

160+
131161
## 2.00.2
132162

133163
- Expanded support for some newer No-Intro DATs.

docs/changelog.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,32 @@ hide:
55

66
# Changelog
77

8+
9+
## 2.01.2
10+
11+
- Fixed a bug where an empty system language list fell back to a global language list
12+
instead of using all languages.
13+
- Fixed a bug that crashed Retool when a trace string was entered in the global settings,
14+
the **Options** tab was set to override in the system settings, and no system-level
15+
trace string was entered.
16+
- Added a PlayStation Vita disc ID regex to automate one stage of choosing between Vita
17+
titles.
18+
- Added a few more demo regexes to identify different demo types.
19+
- When Redump or No-Intro forgot to add the `(Demo)` tag to a title's full name but added
20+
a category of `Demos`, Retool would append `(Demo)` to the full, short, tag-free, and
21+
region-free names to avoid confusion with the full version of the title.
22+
23+
This lead to strange situations in clone lists where a title like
24+
`Example Title (USA) (Trial)` had a short name of `Example Title (Trial) (Demo)`. This
25+
behavior also wasn't taken into account for Retool GUI's title tools, making clone list
26+
updating harder than it needed to be for contributors.
27+
28+
Now a `(Demo)` tag is only added if a title doesn't contain any of a collection of
29+
demo regexes, making short names more predictable to deal with.
30+
- The title tool now has a checkbox for when a title has a DAT category of `Demos`, which
31+
can affect how a title's names are generated.
32+
33+
834
## 2.01.1
935

1036
Looks like post filters needed a little more testing before release. The feature now
@@ -19,6 +45,7 @@ works properly.
1945
such a title was meant to be filtered out, it could randomly turn up in the output DAT
2046
due to the way compilations work.
2147

48+
2249
## 2.01.0
2350

2451
- The **Games** title type is now an option for exclusion. Retool assume titles without
@@ -68,10 +95,12 @@ works properly.
6895
checks the output of multiple different configurations, verifies the output is
6996
consistent, and makes it easier to pick up errors as a result of code changes.
7097

98+
7199
## 2.00.5
72100

73101
- Fixed handling of No-Intro's quasi-RFC 3339 date format.
74102

103+
75104
## 2.00.4
76105

77106
- Added another level of language selection fallback if you have a language order

docs/includes/file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[retool-2.01.1-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.01.1-win-x86-64.zip)
1+
[retool-2.01.2-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.01.2-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-
cb1c0b8383c7db870a384ca34c37bd1f2207d8035cacd5885a3c4c5ea29a5cc4
1+
8e121cdc13a31125b296e6b06c4577da118d6e1461fa29f5f3645679c5fcc2dd

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ theme:
1111
- content.code.annotate
1212
- content.tabs.link
1313
- header.autohide
14-
- navigation.expand
1514
- toc.follow
1615
palette:
1716
scheme: slate

modules/chooseparent.py

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,16 @@ def choose_language(title_set: set[DatNode], config: Config, report_on_match: bo
670670
language_order: list[str] = []
671671

672672
if config.languages_filter:
673-
language_order = config.language_order_user
674-
675673
if config.system_language_order_user:
676674
if {'override': 'true'} in config.system_language_order_user:
677675
language_order = [str(x) for x in config.system_language_order_user if 'override' not in x]
678-
else:
679-
language_order = config.region_order_languages_user
676+
elif {'override': 'true'} in config.system_region_order_user:
677+
for region in [x for x in config.system_region_order_user if x != {'override': 'true'}]:
678+
language_order.extend(config.languages_filter[region])
679+
else:
680+
language_order = language_order = config.language_order_user
681+
else:
682+
language_order = language_order = config.language_order_user
680683

681684
# Select titles based on language
682685
remove_titles: set[DatNode] = set()
@@ -730,13 +733,22 @@ def choose_language(title_set: set[DatNode], config: Config, report_on_match: bo
730733
if not (title_1.is_superset or title_2.is_superset):
731734
if config.languages_filter:
732735
# Cycle through implied languages from region order as the first fallback
733-
for language in config.region_order_languages_user:
736+
fallback_language_order: list[str] = []
737+
738+
# Use the system region order if there is one
739+
if {'override': 'true'} in config.system_region_order_user:
740+
for region in [x for x in config.system_region_order_user if x != {'override': 'true'}]:
741+
fallback_language_order.extend(config.languages_filter[region])
742+
else:
743+
fallback_language_order = config.region_order_languages_user
744+
745+
for language in fallback_language_order:
734746
if (
735747
re.search(language, ','.join(title_1.languages))
736748
and not re.search(language, ','.join(title_2.languages))):
737749
if title_2 in title_set:
738750
if report_on_match:
739-
TraceTools.trace_title('REF0097', [', '.join(config.region_order_languages_user)])
751+
TraceTools.trace_title('REF0097', [', '.join(fallback_language_order)])
740752
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)
741753

742754
remove_titles.add(title_2)
@@ -747,7 +759,7 @@ def choose_language(title_set: set[DatNode], config: Config, report_on_match: bo
747759
and not re.search(language, ','.join(title_1.languages))):
748760
if title_1 in title_set:
749761
if report_on_match:
750-
TraceTools.trace_title('REF0098', [', '.join(list(config.region_order_languages_user))])
762+
TraceTools.trace_title('REF0098', [', '.join(list(fallback_language_order))])
751763
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)
752764

753765
remove_titles.add(title_1)
@@ -1802,7 +1814,7 @@ def choose_parent(processed_titles: dict[str, set[DatNode]], config: Config) ->
18021814
if not (config.user_input.trace or config.user_input.single_cpu):
18031815
bar() # type: ignore
18041816

1805-
eprint('\033[F\033[K* Selecting 1G1R titles... done\n', end='')
1817+
eprint('\033[F\033[K* Selecting 1G1R titles... done.\n', end='')
18061818

18071819
return processed_titles
18081820

@@ -2017,6 +2029,7 @@ def choose_parent_process(config: Config, potential_parents: dict[str, set[DatNo
20172029
if len(parent_titles) > 1: parent_titles = ParentTools.choose_version_revision(config.regex.ps3_id, parent_titles, config, report_on_match)
20182030
if len(parent_titles) > 1: parent_titles = ParentTools.choose_version_revision(config.regex.ps4_id, parent_titles, config, report_on_match)
20192031
if len(parent_titles) > 1: parent_titles = ParentTools.choose_version_revision(config.regex.psp_id, parent_titles, config, report_on_match)
2032+
if len(parent_titles) > 1: parent_titles = ParentTools.choose_version_revision(config.regex.psv_id, parent_titles, config, report_on_match)
20202033

20212034
if report_on_match: TraceTools.trace_title('REF0007', [group_name], parent_titles, keep_remove=False)
20222035

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.01'
3-
VERSION_MINOR: str = '1'
3+
VERSION_MINOR: str = '2'
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: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,15 @@ def category_assign(regexes: tuple[Any, ...], category: str) -> None:
351351
elif self.categories == []:
352352
self.categories.append('Games')
353353

354-
# Check if the (Demo) tag is missing from titles with the category "Demos", and
355-
# add it if so
356-
if 'Demos' in self.categories and '(Demo' not in self.full_name:
354+
# Check if there's no (Demo) or related tags for titles with the category "Demos",
355+
# and add it if so
356+
is_demo: bool = False
357+
358+
for demo_regex in config.regex.demos:
359+
if re.search(demo_regex, self.full_name):
360+
is_demo = True
361+
362+
if not is_demo and 'Demos' in self.categories:
357363
self.short_name = f'{self.short_name.strip()} (Demo)'
358364
self.region_free_name = f'{self.region_free_name.strip()} (Demo)'
359365
self.tag_free_name = f'{self.tag_free_name.strip()} (Demo)'
@@ -383,6 +389,7 @@ def category_assign(regexes: tuple[Any, ...], category: str) -> None:
383389
language_order = config.region_order_languages_user
384390

385391
region_order: list[str] = config.region_order_user
392+
386393
if config.system_region_order_user:
387394
if {'override': 'true'} in config.system_region_order_user:
388395
region_order = [str(x) for x in config.system_region_order_user if 'override' not in x]
@@ -1052,11 +1059,26 @@ def header_details(key: str) -> None:
10521059
eprint('| Numbered dat: Yes')
10531060
eprint('')
10541061

1062+
# Import system settings
1063+
from modules.input import import_clone_list, import_metadata, import_system_settings
1064+
import_system_settings(
1065+
config,
1066+
input_dat.search_name,
1067+
SYSTEM_LANGUAGE_ORDER_KEY,
1068+
SYSTEM_REGION_ORDER_KEY,
1069+
SYSTEM_VIDEO_ORDER_KEY,
1070+
SYSTEM_LIST_PREFIX_KEY,
1071+
SYSTEM_LIST_SUFFIX_KEY,
1072+
SYSTEM_OVERRIDE_EXCLUDE_KEY,
1073+
SYSTEM_OVERRIDE_INCLUDE_KEY,
1074+
SYSTEM_FILTER_KEY,
1075+
SYSTEM_EXCLUSIONS_OPTIONS_KEY)
1076+
10551077
search_games: list[Any] = root.findall('game')
10561078

10571079
if config.user_input.trace or config.user_input.single_cpu:
10581080
alive_bar_context = nullcontext()
1059-
eprint('* Selecting 1G1R titles...')
1081+
eprint('* Processing DAT file...')
10601082
else:
10611083
progress_bar: str = 'smooth'
10621084
spinner: str = 'waves'
@@ -1140,21 +1162,6 @@ def header_details(key: str) -> None:
11401162
input_dat.end = True
11411163
return input_dat
11421164

1143-
# Import system settings
1144-
from modules.input import import_clone_list, import_metadata, import_system_settings
1145-
import_system_settings(
1146-
config,
1147-
input_dat.search_name,
1148-
SYSTEM_LANGUAGE_ORDER_KEY,
1149-
SYSTEM_REGION_ORDER_KEY,
1150-
SYSTEM_VIDEO_ORDER_KEY,
1151-
SYSTEM_LIST_PREFIX_KEY,
1152-
SYSTEM_LIST_SUFFIX_KEY,
1153-
SYSTEM_OVERRIDE_EXCLUDE_KEY,
1154-
SYSTEM_OVERRIDE_INCLUDE_KEY,
1155-
SYSTEM_FILTER_KEY,
1156-
SYSTEM_EXCLUSIONS_OPTIONS_KEY)
1157-
11581165
# Check all the overrides and post filters for invalid regex and strip it out
11591166
if not config.user_input.no_overrides:
11601167
config.global_exclude = regex_test(list(config.global_exclude), 'global exclude', 'user filter')
@@ -1250,7 +1257,7 @@ def header_details(key: str) -> None:
12501257

12511258
eprint(f'{Font.end}')
12521259

1253-
eprint('\033[F\033[K* Processing DAT file... done\n', end='')
1260+
eprint('\033[F\033[K* Processing DAT file... done.\n', end='')
12541261
else:
12551262
eprint('failed.')
12561263
if '<game' not in input_dat.contents:

modules/gui/retool_clone_list_name.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
QFont, QFontDatabase, QGradient, QIcon,
1616
QImage, QKeySequence, QLinearGradient, QPainter,
1717
QPalette, QPixmap, QRadialGradient, QTransform)
18-
from PySide6.QtWidgets import (QApplication, QLabel, QLineEdit, QMainWindow,
19-
QSizePolicy, QSpacerItem, QVBoxLayout, QWidget)
18+
from PySide6.QtWidgets import (QApplication, QCheckBox, QLabel, QLineEdit,
19+
QMainWindow, QSizePolicy, QSpacerItem, QVBoxLayout,
20+
QWidget)
2021

2122
from modules.gui.custom_widgets import CustomLineEdit
2223
from . import resources_rc
@@ -76,6 +77,11 @@ def setupUi(self, CloneListNameTool):
7677

7778
self.verticalLayout.addWidget(self.lineEditEnterName)
7879

80+
self.checkBoxDemos = QCheckBox(self.centralwidget)
81+
self.checkBoxDemos.setObjectName(u"checkBoxDemos")
82+
83+
self.verticalLayout.addWidget(self.checkBoxDemos)
84+
7985
self.verticalSpacer = QSpacerItem(13, 8, QSizePolicy.Minimum, QSizePolicy.Fixed)
8086

8187
self.verticalLayout.addItem(self.verticalSpacer)
@@ -185,6 +191,7 @@ def retranslateUi(self, CloneListNameTool):
185191
CloneListNameTool.setWindowTitle(QCoreApplication.translate("CloneListNameTool", u"Title tool", None))
186192
self.labelContribute.setText(QCoreApplication.translate("CloneListNameTool", u"<html><head/><body><p>This tool is useful if you want to contribute to Retool's clone lists or development. If you enter a title's full name, it shows you the other names Retool assigns to the title as part of its matching process. You can also enter the group name that you want to assign in an override or variants object, and see what the actual group name is that Retool assigns. <a href=\"https://unexpectedpanda.github.io/retool/naming-system/\"><span style=\" text-decoration: underline; color:#0000ff;\">Read the documentation</span></a> to learn more.</p></body></html>", None))
187193
self.labelEnterName.setText(QCoreApplication.translate("CloneListNameTool", u"Enter the full name as it appears in the DAT file, or your intended group name", None))
194+
self.checkBoxDemos.setText(QCoreApplication.translate("CloneListNameTool", u"Title has a category of Demos (adds a tag to title names that have no recognized demo tags)", None))
188195
self.labelShortName.setText(QCoreApplication.translate("CloneListNameTool", u"Default short name", None))
189196
self.lineEditShortName.setText("")
190197
self.labelGroupName.setText(QCoreApplication.translate("CloneListNameTool", u"Default group name", None))

0 commit comments

Comments
 (0)