Merge pull request #3 from w7ncx/main

Fix spelling, add support for local_talkgroup_ids.json
This commit is contained in:
Waldek 2021-06-27 09:09:39 +02:00 committed by GitHub
commit 997894df1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View File

@ -21,6 +21,7 @@ SUBSCRIBER_FILE = 'subscriber_ids.json' # Will auto-download
TGID_FILE = 'talkgroup_ids.json' # User provided
LOCAL_SUB_FILE = 'local_subscriber_ids.json' # User provided (optional, leave '' if you don't use it)
LOCAL_PEER_FILE = 'local_peer_ids.json' # User provided (optional, leave '' if you don't use it)
LOCAL_TGID_FILE = 'local_talkgroup_ids.json' # User provided (optional, leave '' if you don't use it)
FILE_RELOAD = 15 # Number of days before we reload DMR-MARC database files
PEER_URL = 'https://database.radioid.net/static/rptrs.json'
SUBSCRIBER_URL = 'https://database.radioid.net/static/users.json'

View File

@ -46,7 +46,7 @@ include_once 'include/config.php';
</tr>
</table>
<br>
<span style="text-align: center;">Hotspot: D - duplex | S - smiplex</span>
<span style="text-align: center;">Hotspot: D - duplex | S - simplex</span>
</fieldset></div><br>
<p style="text-align: center;"><span style="text-align: center;">

10
local_talkgroup_ids.json Normal file
View File

@ -0,0 +1,10 @@
{
"results": [
{
"tgid": 9,
"callsign": "TG Local",
"country": "",
"id": "9"
}
]
}

View File

@ -1008,6 +1008,11 @@ if __name__ == '__main__':
logging.info('ID ALIAS MAPPER: local_subscriber_ids added to subscriber_ids dictionary')
subscriber_ids.update(local_subscriber_ids)
local_talkgroup_ids = mk_full_id_dict(PATH, LOCAL_TGID_FILE, 'tgid')
if local_talkgroup_ids:
logging.info('ID ALIAS MAPPER: local_talkgroup_ids added to talkgroup_ids dictionary')
talkgroup_ids.update(local_talkgroup_ids)
local_peer_ids = mk_full_id_dict(PATH, LOCAL_PEER_FILE, 'peer')
if local_peer_ids:
logging.info('ID ALIAS MAPPER: local_peer_ids added peer_ids dictionary')