From c89fde220c141fcdcee7c3b574c24334f1dab092 Mon Sep 17 00:00:00 2001 From: yrriban Date: Tue, 15 Jul 2025 22:47:01 -0400 Subject: [PATCH] If map names are included in the config, use them when generating text for the video thumbnail. --- dcc/text.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dcc/text.py b/dcc/text.py index 8e1ace9..a349a62 100644 --- a/dcc/text.py +++ b/dcc/text.py @@ -32,7 +32,12 @@ class Text(dcc.doom_base.WadMap): return parser def take_action(self, parsed_args): - text = sys.stdin.read().rstrip() + 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() if not parsed_args.nomap: text = "MAP{}: {}".format(parsed_args.map, text) text = "{}\n{}".format(text, parsed_args.demotype)