Support setting a name for a demo, supporting more than one demo stored at a time for a map.

This commit is contained in:
yrriban 2025-05-11 17:28:07 -04:00
parent c73c7dd457
commit 85d3686f1c
11 changed files with 35 additions and 30 deletions

View file

@ -12,8 +12,8 @@ class Put(dcc.doom_base.WadMap):
# TODO: accept configuration for bucket name
def take_action(self, parsed_args):
s3_client = boto3.client('s3')
demo = dcc.config.DemoInPath(parsed_args.wad, parsed_args.map)
bucket = dcc.config.DemoName(parsed_args.wad, parsed_args.map)
demo = dcc.config.DemoInPath(parsed_args.wad, parsed_args.map, parsed_args.name)
bucket = dcc.config.DemoName(parsed_args.wad, parsed_args.map, parsed_args.name)
if parsed_args.dsda:
pattern = ("{}{}".format(parsed_args.wad[0:2], parsed_args.map) if not parsed_args.single else parsed_args.wad[0:4]) + "*.zip"
zips = [x for x in dcc.config.DEMOS.joinpath(parsed_args.wad).glob(pattern)]