diff --git a/gogrepo.py b/gogrepo.py index 5185627..caf3405 100755 --- a/gogrepo.py +++ b/gogrepo.py @@ -465,6 +465,7 @@ def process_argv(argv): g1.add_argument('-dryrun', action='store_true', help='display, but skip downloading of any files') g1.add_argument('-skipextras', action='store_true', help='skip downloading of any GOG extra files') g1.add_argument('-skipgames', action='store_true', help='skip downloading of any GOG game files') + g1.add_argument('-skippatches', action='store_true', help='skip downloading of any game patches') g1.add_argument('-id', action='store', help='id of the game in the manifest to download') g1.add_argument('-wait', action='store', type=float, help='wait this long in hours before starting', default=0.0) # sleep in hr @@ -771,7 +772,7 @@ def cmd_import(src_dir, dest_dir): shutil.copy(f, dest_file) -def cmd_download(savedir, skipextras, skipgames, skipids, dryrun, id): +def cmd_download(savedir, skipextras, skipgames, skippatches, skipids, dryrun, id): sizes, rates, errors = {}, {}, {} work = Queue() # build a list of work items @@ -816,6 +817,9 @@ def gigs(b): if skipgames: item.downloads = [] + if skippatches: + item.downloads = [d for d in item.downloads if not d["name"].startswith("patch_")] + # Generate and save a game info text file if not dryrun: with ConditionalWriter(os.path.join(item_homedir, INFO_FILENAME)) as fd_info: @@ -1147,7 +1151,7 @@ def main(args): if args.wait > 0.0: info('sleeping for %.2fhr...' % args.wait) time.sleep(args.wait * 60 * 60) - cmd_download(args.savedir, args.skipextras, args.skipgames, args.skipids, args.dryrun, args.id) + cmd_download(args.savedir, args.skipextras, args.skipgames, args.skippatches, args.skipids, args.dryrun, args.id) elif args.cmd == 'import': cmd_import(args.src_dir, args.dest_dir) elif args.cmd == 'verify':