Use QRZ's full formatted name (includes nickname) if available; if not try to extract the nickname along with first and surnames. Closes #110.

This commit is contained in:
Ian Renton
2026-06-06 09:04:48 +01:00
parent 72360758ac
commit a1c7cc6386
10 changed files with 26 additions and 22 deletions

View File

@@ -363,8 +363,12 @@ class LookupHelper:
"""Infer an operator name from a callsign (requires QRZ.com/HamQTH)"""
data = self._get_qrz_data_for_callsign(call, credentials)
if data and "name_fmt" in data:
return data["name_fmt"]
if data and "fname" in data:
name = data["fname"]
if "nick" in data:
name = name + " \"" + data["nick"] + "\""
if "name" in data:
name = name + " " + data["name"]
return name