If map names are included in the config, use them when generating text for the video thumbnail.

This commit is contained in:
yrriban 2025-07-15 22:47:01 -04:00
parent 70c36ac615
commit c89fde220c

View file

@ -32,6 +32,11 @@ class Text(dcc.doom_base.WadMap):
return parser return parser
def take_action(self, parsed_args): def take_action(self, parsed_args):
text = None
map_names = self._config["map_names"]
if map_names is not None:
text = map_names[f"map{parsed_args.map}"]
if text is None:
text = sys.stdin.read().rstrip() text = sys.stdin.read().rstrip()
if not parsed_args.nomap: if not parsed_args.nomap:
text = "MAP{}: {}".format(parsed_args.map, text) text = "MAP{}: {}".format(parsed_args.map, text)