Skip to content

Commit

Permalink
A bug fix and a feature addition
Browse files Browse the repository at this point in the history
- Fixed an invalid use of commaSplit() (instead of self.commaSplit()) that prevented region settings from being saved
- Added timestamp parsing to automatic DAT file detection
  • Loading branch information
Mode8fx committed Jul 11, 2022
1 parent 6697ab8 commit 43638e4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,17 @@ def ssdHelper(self, name):
if path.isfile(currSystemDAT):
self.datFilePathChoices[self.exportTabNum].set(currSystemDAT)
return True
for df in listdir(self.g_datFilePath.get()):
try:
currSystemDAT = path.join(self.g_datFilePath.get(), df).replace("\\", "/")
fileName, fileExt = path.splitext(df)
assert fileExt == ".dat"
fileTimestamp = df.replace(name, "").strip()
assert datetime.strptime(df, name+" (%Y%m%d-%H%M%S).dat") is not None
self.datFilePathChoices[self.exportTabNum].set(currSystemDAT)
return True
except:
pass
return False

def setInputRomsetDir(self, systemName, romsetFolderPath):
Expand Down Expand Up @@ -1990,7 +2001,7 @@ def settings_saveChanges(self):
if self.regionGroupNames[i].get().strip() == self.regionGroupNames[j].get().strip():
regionFailureReasons += "Region groups "+str(i+1)+" and "+str(j+1)+" have the same name.\n"
tagsAreInvalid = True
for tag in commaSplit(self.regionTags[i].get()):
for tag in self.commaSplit(self.regionTags[i].get()):
if tag != "":
tagsAreInvalid = False
break
Expand Down Expand Up @@ -2144,7 +2155,7 @@ def menu_viewHelp(self):
showinfo("Help", "Hover over certain options for further details about them. You can also click the \"?\" button on some pages for more information.")

def menu_viewAbout(self):
showinfo("About", "EzRO Rom Organizer v1.00\nhttps://github.com/Mips96/EzRO-gui\n\nQuestions? Bug reports? Feel free to leave an issue on the project GitHub!")
showinfo("About", "EzRO Rom Organizer v1.01\nhttps://github.com/Mips96/EzRO-gui\n\nQuestions? Bug reports? Feel free to leave an issue on the project GitHub!")

def menu_viewExternalLibraries(self):
showinfo("External Libraries", "ttkScrollableNotebook\nhttps://github.com/muhammeteminturgut/ttkScrollableNotebook\nLicensed under GPL-3.0")
Expand Down

0 comments on commit 43638e4

Please sign in to comment.