Apprise exclude these species instead of include

This commit is contained in:
ehpersonal38
2023-03-21 22:04:16 -04:00
parent bb50c69b22
commit a65d070837
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -542,7 +542,7 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
<hr>
<label for="minimum_time_limit">Minimum time between notifications of the same species (sec):</label>
<input type="number" id="minimum_time_limit" name="minimum_time_limit" value="<?php echo $config['APPRISE_MINIMUM_SECONDS_BETWEEN_NOTIFICATIONS_PER_SPECIES'];?>" min="0"><br>
<label for="only_notify_species_names">ONLY notify for these species (comma separated common names):</label>
<label for="only_notify_species_names">Exclude these species (comma separated common names):</label>
<input type="text" id="only_notify_species_names" placeholder="Northern Cardinal,American Crow,Carolina Chickadee" name="only_notify_species_names" value="<?php echo $config['APPRISE_ONLY_NOTIFY_SPECIES_NAMES'];?>" size=96><br>
<br>
+1 -1
View File
@@ -49,7 +49,7 @@ def sendAppriseNotifications(species, confidence, path, date, time, week, latitu
APPRISE_ONLY_NOTIFY_SPECIES_NAMES = settings_dict.get('APPRISE_ONLY_NOTIFY_SPECIES_NAMES')
if APPRISE_ONLY_NOTIFY_SPECIES_NAMES is not None and APPRISE_ONLY_NOTIFY_SPECIES_NAMES.strip() != "":
if not any(bird.lower().replace(" ", "") in comName.lower().replace(" ", "") for bird in APPRISE_ONLY_NOTIFY_SPECIES_NAMES.split(",")):
if any(bird.lower().replace(" ", "") in comName.lower().replace(" ", "") for bird in APPRISE_ONLY_NOTIFY_SPECIES_NAMES.split(",")):
return
APPRISE_MINIMUM_SECONDS_BETWEEN_NOTIFICATIONS_PER_SPECIES = settings_dict.get('APPRISE_MINIMUM_SECONDS_BETWEEN_NOTIFICATIONS_PER_SPECIES')