Actually check for invalid TIDs rather than just check for an empty string

This commit is contained in:
Campbell 2024-04-20 00:03:08 -04:00
parent 529107b280
commit 997cc0f58b
Signed by: NinjaCheetah
GPG Key ID: B547958AF96ED344

View File

@ -167,8 +167,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
elif result == -2: elif result == -2:
msgBox.setWindowTitle("Title ID/Version Not Found") msgBox.setWindowTitle("Title ID/Version Not Found")
msgBox.setText("No title with the provided Title ID or version could be found!") msgBox.setText("No title with the provided Title ID or version could be found!")
msgBox.setInformativeText("Please make sure that you have entered a valid Title ID or selected one from the" msgBox.setInformativeText("Please make sure that you have entered a valid Title ID, or selected one from "
" title database, and that the provided version exists for the title you are" " the title database, and that the provided version exists for the title you are"
" attempting to download.") " attempting to download.")
msgBox.exec() msgBox.exec()
elif result == -3: elif result == -3:
@ -199,7 +199,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
def run_nus_download(self, progress_callback): def run_nus_download(self, progress_callback):
tid = self.ui.tid_entry.text() tid = self.ui.tid_entry.text()
if tid == "": if len(tid) != 16:
return -1 return -1
try: try:
version = int(self.ui.version_entry.text()) version = int(self.ui.version_entry.text())