If map names are included in the config, use them when generating text for the video thumbnail.
This commit is contained in:
parent
70c36ac615
commit
c89fde220c
1 changed files with 6 additions and 1 deletions
|
@ -32,7 +32,12 @@ class Text(dcc.doom_base.WadMap):
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
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:
|
if not parsed_args.nomap:
|
||||||
text = "MAP{}: {}".format(parsed_args.map, text)
|
text = "MAP{}: {}".format(parsed_args.map, text)
|
||||||
text = "{}\n{}".format(text, parsed_args.demotype)
|
text = "{}\n{}".format(text, parsed_args.demotype)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue