more clean-up stuff

This commit is contained in:
Jakob Ketterl 2019-06-09 19:12:37 +02:00
parent e1d54bdf1d
commit 2053a6b16b
2 changed files with 5 additions and 2 deletions

View File

@ -1356,7 +1356,8 @@ function update_metadata(meta) {
$(el).find(".openwebrx-ysf-down").text(down); $(el).find(".openwebrx-ysf-down").text(down);
break; break;
} else {
$(".openwebrx-meta-panel .openwebrx-meta-autoclear").text("");
} }
} }

View File

@ -64,11 +64,13 @@ class MetaParser(object):
enrichers = { enrichers = {
"DMR": DmrMetaEnricher() "DMR": DmrMetaEnricher()
} }
def __init__(self, handler): def __init__(self, handler):
self.handler = handler self.handler = handler
def parse(self, meta): def parse(self, meta):
fields = meta.split(";") fields = meta.split(";")
meta = {v[0] : "".join(v[1:]) for v in map(lambda x: x.split(":"), fields)} meta = {v[0]: "".join(v[1:]) for v in map(lambda x: x.split(":"), fields) if v[0] != ""}
if "protocol" in meta: if "protocol" in meta:
protocol = meta["protocol"] protocol = meta["protocol"]