added "ignore EOW" feature

master
cheetah 1 year ago
parent fc0db5d66d
commit dbaecc77d7

@ -42,6 +42,7 @@
<v-row v-for="(region, index) in configData.regions" :key="region._id" >
<v-col cols="4">
<v-checkbox label="Active" v-model="region.active"></v-checkbox>
<v-checkbox label="Ignore EOW" v-model="region.ignoreEOW"></v-checkbox>
<v-text-field v-model="region.name" label="Name"></v-text-field>
<v-text-field v-model="region.dwdID" label="DWD ID"></v-text-field>
<v-autocomplete
@ -249,6 +250,7 @@
this.configData.regions.push({
name: "",
active: true,
ignoreEOW: false,
levels: {},
dwdID: "",
})

@ -119,9 +119,12 @@ async function checkDWD() {
? msg.split('Quelle:')[0]
: msg
msg = replaceUmlaute(msg)
console.log(msg, msg.indexOf('Es sind keine Warnungen') > -1, region.ignoreEOW)
if (!!stateMachine[ region.dwdID ]) {
if (stateMachine [ region.dwdID ] != msg) {
if (msg.indexOf('Es sind keine Warnungen') > -1) {
if (!!region.ignoreEOW) continue
}
await sendPage( region.preset, msg )
stateMachine [ region.dwdID ] = msg
}

Loading…
Cancel
Save