Skip to content

Commit

Permalink
Update openGOALModLauncher.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedb0T committed Jun 5, 2024
1 parent ef19bbe commit c3a8514
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions openGOALModLauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class ColumnEnum(IntEnum):
0, # website
0, # videos
0, # photos
]
]

FILTER_STR = ""
FILTER_GAME = "jak1"
Expand Down Expand Up @@ -323,7 +323,7 @@ def getRefreshedTableData(sort_col_idx):
release_date = datetime.strptime(mod["release_date"], '%Y-%m-%d')
if datetime.now() - release_date < timedelta(days = 10):
release_date_str = release_date_str + " ✨NEW✨"

mod_table_data.append(
[
mod_id,
Expand Down Expand Up @@ -367,7 +367,7 @@ def getRefreshedTableData(sort_col_idx):
# add asc/desc arrows if not in our wakeup sort special case
sorted_table_headings[remapped_col_idx] += " ↑" if LATEST_TABLE_SORT[1] else " ↓"

if remapped_col_idx == ColumnEnum.SPECIAL:
if remapped_col_idx == ColumnEnum.SPECIAL:
# special sort for wakeup, do coalesce(access date,release date)
mod_table_data.sort(
key=lambda x: x[ColumnEnum.RELEASE_DATE]
Expand Down Expand Up @@ -868,9 +868,19 @@ def loading_screen_with_thread(thread):
tmpModURL = window["-SELECTEDMODNAME-"].metadata["url"]
tmpGame = window["-SELECTEDMODNAME-"].metadata["game"]

launch_thread = threading.Thread(target=launch_mod, args=(tmpModURL,))

loading_screen_with_thread(launch_thread)
selected_mod_tags = window["-SELECTEDMODTAGS-"].get()
if "external" in selected_mod_tags:
ans = sg.popup_ok_cancel(tmpModName + " is an external mod that can be found at " + tmpModURL + " would you like to go there now?", icon=iconfile, image=iconfile)
if ans == "OK":
webbrowser.open(tmpModURL)
reset()
else:
launch_thread = threading.Thread(target=launch_mod, args=(tmpModURL,))

loading_screen_with_thread(launch_thread)


elif event == "-VIEWFOLDER-":
tmpModSelected = window["-SELECTEDMODNAME-"].metadata["id"]
subfolders = [f.name for f in os.scandir(ModFolderPATH) if f.is_dir()]
Expand Down

0 comments on commit c3a8514

Please sign in to comment.