1
0
mirror of synced 2024-11-30 15:54:27 +01:00

parsers.py: Allow lowercase COURSE names

This commit is contained in:
Viv 2024-02-10 18:11:49 -05:00
parent 7b7dd15a62
commit 768f05d539

View File

@ -101,6 +101,7 @@ def split_tja_lines_into_courses(lines: List[str]) -> TJASong:
# Course-specific metadata fields
if name_upper == 'COURSE':
value = value.lower().capitalize() # coerce hard/HARD -> Hard
if value not in NORMALIZE_COURSE:
raise ValueError(f"Invalid COURSE value: '{value}'")
current_course = NORMALIZE_COURSE[value]