mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-23 21:25:12 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user