mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2025-04-25 07:01:01 -04:00
Fix version lookup
Checking regions was pretty superfluous anyway, since it only served to *potentially* speed up the lookup.
This commit is contained in:
parent
9c15eac1fd
commit
dd79be0b48
24
NUSGet.py
24
NUSGet.py
@ -400,26 +400,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
if not ((title_["TID"][-2:] == "XX" and title_["TID"][:-2] == tid[:-2]) or title_["TID"] == tid):
|
||||
continue
|
||||
|
||||
region = None
|
||||
found_ver = False
|
||||
if title_["TID"][-2:] == "XX":
|
||||
global regions
|
||||
for region_ in regions:
|
||||
for code in regions[region_]:
|
||||
if code == tid[:-2]:
|
||||
region = region_
|
||||
break
|
||||
|
||||
if region is None:
|
||||
QMessageBox.critical(self, app.translate("MainWindow", "Script Failure"), app.translate("MainWindow", "Title #%n belongs to an unknown region.", "", index+1), buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.Ok)
|
||||
return
|
||||
else:
|
||||
region = "World"
|
||||
|
||||
for db_version in title_["Versions"][region]:
|
||||
if db_version == version:
|
||||
found_ver = True
|
||||
break
|
||||
for region in title_["Versions"]:
|
||||
for db_version in title_["Versions"][region]:
|
||||
if db_version == version:
|
||||
found_ver = True
|
||||
break
|
||||
|
||||
if not found_ver:
|
||||
QMessageBox.critical(self, app.translate("MainWindow", "Script Failure"), app.translate("MainWindow", "The version for title #%n could not be discovered in the database.", "", index+1), buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.Ok)
|
||||
|
Loading…
x
Reference in New Issue
Block a user