use a dropdown for callsign database setting; add aprs.fi
This commit is contained in:
@ -2,7 +2,7 @@ from owrx.property import PropertyLayer
|
||||
|
||||
|
||||
defaultConfig = PropertyLayer(
|
||||
version=7,
|
||||
version=8,
|
||||
max_clients=20,
|
||||
receiver_name="[Callsign]",
|
||||
receiver_location="Budapest, Hungary",
|
||||
@ -147,7 +147,6 @@ defaultConfig = PropertyLayer(
|
||||
squelch_auto_margin=10,
|
||||
google_maps_api_key="",
|
||||
map_position_retention_time=2 * 60 * 60,
|
||||
callsign_url="https://www.qrzcq.com/call/{}",
|
||||
decoding_queue_workers=2,
|
||||
decoding_queue_length=10,
|
||||
wsjt_decoding_depth=3,
|
||||
|
@ -111,8 +111,21 @@ class ConfigMigratorVersion6(ConfigMigrator):
|
||||
config["version"] = 7
|
||||
|
||||
|
||||
class ConfigMigratorVersion7(ConfigMigrator):
|
||||
def migrate(self, config):
|
||||
if "callsign_url" in config:
|
||||
if "qrzcq.com" in config["callsign_url"]:
|
||||
config["callsign_service"] = "qrzcq"
|
||||
elif "qrz.com" in config["callsign_url"]:
|
||||
config["callsign_service"] = "qrz"
|
||||
else:
|
||||
logger.warning("unable to migrate callsign_url! please check settings!")
|
||||
del config["callsign_url"]
|
||||
config["version"] = 8
|
||||
|
||||
|
||||
class Migrator(object):
|
||||
currentVersion = 7
|
||||
currentVersion = 8
|
||||
migrators = {
|
||||
1: ConfigMigratorVersion1(),
|
||||
2: ConfigMigratorVersion2(),
|
||||
@ -120,6 +133,7 @@ class Migrator(object):
|
||||
4: ConfigMigratorVersion4(),
|
||||
5: ConfigMigratorVersion5(),
|
||||
6: ConfigMigratorVersion6(),
|
||||
7: ConfigMigratorVersion7(),
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
|
@ -456,7 +456,7 @@ class MapConnection(OpenWebRxClient):
|
||||
"google_maps_api_key",
|
||||
"receiver_gps",
|
||||
"map_position_retention_time",
|
||||
"callsign_url",
|
||||
"callsign_service",
|
||||
"receiver_name",
|
||||
)
|
||||
filtered_config.wire(self.write_config)
|
||||
|
@ -168,12 +168,17 @@ class GeneralSettingsController(SettingsFormController):
|
||||
infotext="Specifies how log markers / grids will remain visible on the map",
|
||||
append="s",
|
||||
),
|
||||
TextInput(
|
||||
"callsign_url",
|
||||
"Callsign database URL",
|
||||
infotext="Specifies callsign lookup URL, such as QRZ.COM "
|
||||
+ "or QRZCQ.COM. Place curly brackers ({}) where callsign "
|
||||
+ "is supposed to be.",
|
||||
DropdownInput(
|
||||
"callsign_service",
|
||||
"Callsign database service",
|
||||
infotext="Allows users to navigate to an external callsign database service by clicking on "
|
||||
+ "callsigns",
|
||||
options=[
|
||||
Option(None, "disabled"),
|
||||
Option("qrzcq", "qrzcq.com"),
|
||||
Option("qrz", "qrz.com"),
|
||||
Option("aprsfi", "aprs.fi"),
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user