Skip to content

Commit

Permalink
feat: parse frequency name to title case
Browse files Browse the repository at this point in the history
  • Loading branch information
moldhouse committed Apr 11, 2024
1 parent 87f3577 commit 1d19458
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,13 @@ def as_feature(self, item: dict[str, Any]) -> Feature | None:
frequency = next(
(f for f in item["frequencies"] if f["primary"]), item["frequencies"][0]
)
description = frequency.get("name")
if description is not None:
description = description.title()
radio = {
"radio_frequency": frequency["value"],
"radio_type": FrequencyKind(int(frequency["type"])).name,
"radio_description": frequency.get("name"),
"radio_description": description,
}

rwy = {}
Expand Down

0 comments on commit 1d19458

Please sign in to comment.