Merge pull request #724 from knmurphy/enable-apprise-plugins

load apprise notification plugins from standard locations
This commit is contained in:
ehpersonal38
2023-02-14 20:26:17 -05:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -263,7 +263,7 @@ if(isset($_GET['sendtest']) && $_GET['sendtest'] == "true") {
$body = str_replace("\$overlap", $overlap, $body);
$body = str_replace("\$flickrimage", $exampleimage, $body);
echo "<pre class=\"bash\">".shell_exec($home."/BirdNET-Pi/birdnet/bin/apprise -vv -t '".$title."' -b '".$body."' ".$attach." ".$cf." ")."</pre>";
echo "<pre class=\"bash\">".shell_exec($home."/BirdNET-Pi/birdnet/bin/apprise -vv --plugin-path ".$home."/.apprise/plugins "." -t '".$title."' -b '".$body."' ".$attach." ".$cf." ")."</pre>";
die();
}
+7 -1
View File
@@ -13,7 +13,13 @@ DB_PATH = userDir + '/BirdNET-Pi/scripts/birds.db'
flickr_images = {}
species_last_notified = {}
apobj = apprise.Apprise()
asset = apprise.AppriseAsset(
plugin_paths=[
userDir + "/.apprise/plugins",
userDir + "/.config/apprise/plugins",
]
)
apobj = apprise.Apprise(asset=asset)
config = apprise.AppriseConfig()
config.add(APPRISE_CONFIG)
apobj.add(config)