|
27 | 27 | from .ffmpeg import FFMpeg |
28 | 28 | from . import templating as bb |
29 | 29 | from .submission import (Submission, form_field, finalize, |
30 | | - SubmissionAttributeError) |
| 30 | + SubmissionAttributeError, rlinput) |
31 | 31 | from .tracker import Tracker |
32 | 32 | from .scene import is_scene_crc, query_scene_fname |
33 | 33 |
|
@@ -1081,10 +1081,19 @@ def _render_form_tags(self): |
1081 | 1081 | 'trip.hop'} |
1082 | 1082 | tags = self['summary']['tags'] |
1083 | 1083 | if not tags: |
1084 | | - tags = input('No tags found. Please enter tags:').split(',') |
| 1084 | + tags = input("No tags found. Please enter tags " |
| 1085 | + "(comma-separated): ").split(',') |
1085 | 1086 | tags = set(format_tag(tag) for tag in tags) |
1086 | | - assert tags & _defaults != set() |
1087 | | - return list(tags) |
| 1087 | + while True: |
| 1088 | + try: |
| 1089 | + assert tags & _defaults != set() |
| 1090 | + except AssertionError: |
| 1091 | + print("Default tags:\n" + ", ".join(sorted(_defaults))) |
| 1092 | + print("Submission must contain at least one default tag.") |
| 1093 | + tags = rlinput("Enter tags: ", ",".join(tags)).split(',') |
| 1094 | + tags = set(format_tag(tag) for tag in tags) |
| 1095 | + else: |
| 1096 | + return ",".join(tags) |
1088 | 1097 |
|
1089 | 1098 | def _render_section_information(self): |
1090 | 1099 | release, rg = self['release'] |
|
0 commit comments