invalid items now have proper down dates
This commit is contained in:
parent
facab26ff2
commit
5355675a6a
@ -635,6 +635,16 @@ class LibraryTab(ctk.CTkScrollableFrame):
|
|||||||
|
|
||||||
if offline_date:
|
if offline_date:
|
||||||
down_date = offline_date
|
down_date = offline_date
|
||||||
|
elif invalid_warn:
|
||||||
|
try:
|
||||||
|
zone_path = Path(folder) / "zone"
|
||||||
|
for ff_file in zone_path.glob("*.ff"):
|
||||||
|
if ff_file.exists():
|
||||||
|
creation_timestamp = ff_file.stat().st_mtime
|
||||||
|
break
|
||||||
|
down_date = datetime.fromtimestamp(creation_timestamp).strftime("%d %b, %Y @ %I:%M%p")
|
||||||
|
except:
|
||||||
|
down_date = "Failed to get download date"
|
||||||
else:
|
else:
|
||||||
down_date = self.get_item_by_id(items_file, workshop_id, 'date')
|
down_date = self.get_item_by_id(items_file, workshop_id, 'date')
|
||||||
|
|
||||||
|
@ -1625,7 +1625,8 @@ class BOIIIWD(ctk.CTk):
|
|||||||
remove_tree(map_folder)
|
remove_tree(map_folder)
|
||||||
remove_tree(download_folder)
|
remove_tree(download_folder)
|
||||||
|
|
||||||
self.library_tab.update_item(self.edit_destination_folder.get(), workshop_id, mod_type, folder_name)
|
if not invalid_item_folder:
|
||||||
|
self.library_tab.update_item(self.edit_destination_folder.get(), workshop_id, mod_type, folder_name)
|
||||||
self.show_complete_message(message=f"{mod_type.capitalize()} files were downloaded\nYou can run the game now!\nPS: You have to restart the game \n(pressing launch will launch/restarts)")
|
self.show_complete_message(message=f"{mod_type.capitalize()} files were downloaded\nYou can run the game now!\nPS: You have to restart the game \n(pressing launch will launch/restarts)")
|
||||||
self.button_download.configure(state="normal")
|
self.button_download.configure(state="normal")
|
||||||
self.button_stop.configure(state="disabled")
|
self.button_stop.configure(state="disabled")
|
||||||
|
Loading…
Reference in New Issue
Block a user