Skip to content

Commit

Permalink
More aggressive Wakelock on Windows, fix bug when game folder rename …
Browse files Browse the repository at this point in the history
…fails
  • Loading branch information
Kalanyr committed Feb 3, 2022
1 parent 25cc8ad commit 7ab1d02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gogrepoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def handle_game_renames(savedir,gamesdb,dryrun):
if not dryrun:
shutil.move(src_dir,dst_dir)
except Exception:
error(' -> rename failed "{}" -> "{}"'.format(olditem.title, newitem.title))
error(' -> rename failed "{}" -> "{}"'.format(game.old_title, game.title))
for item in game.downloads+game.galaxyDownloads+game.sharedDownloads+game.extras:
try:
_ = item.old_name
Expand Down Expand Up @@ -2614,7 +2614,7 @@ def __init__(self):
self.ES_SYSTEM_REQUIRED = 0x00000001
self.ES_DISPLAY_REQUIRED = 0x00000002
#Windows is not particularly consistent on what is required for a wakelock for a script that often uses a USB device, so define WAKELOCK for easy changing. This works on Windows 10 as of the October 2017 update.
self.ES_WAKELOCK = self.ES_CONTINUOUS | self.ES_SYSTEM_REQUIRED
self.ES_WAKELOCK = self.ES_CONTINUOUS | self.ES_SYSTEM_REQUIRED | self.ES_DISPLAY_REQUIRED

if (platform.system() == "Darwin"):

Expand Down

0 comments on commit 7ab1d02

Please sign in to comment.