CommunityDragon / CDTB

A library containing everything to extract files from client files.
GNU Lesser General Public License v3.0
119 stars 33 forks source link

New --patchline argument #66

Closed LeagueOfPoro closed 1 year ago

LeagueOfPoro commented 1 year ago

Added support for --patchline pbe argument as a working alternative to --cdn.

LeagueOfPoro commented 1 year ago

Thanks for your comment. Based on that, I replaced --patchline pbe with a simple --pbe. This way it defaults to live when not set and pbe if the flag is present.

benoitryder commented 1 year ago

Keeping --patchline is better IMHO, because it's more generic and matches directly the storage JSON format.

And you can use the following to have same default/fallback behavior:

    storage_parser.add_argument('--patchline', choices=['live', 'pbe'], default=None,
                                help="use PBE patchline")
        if args.patchline is not None:
            if conf['type'] == 'patcher':
                conf['patchline'] = args.patchline
            else:
                parser.error("--patchline is only supported for 'patcher' storage")
LeagueOfPoro commented 1 year ago

I would argue --pbe makes for a more concise command. However, matching the JSON config makes sense. Changed