Comments (10)
Sure,
Keep in mind priorities are 100% supported:
See here
Just add it to the Apprise URL:
pover://credentials/?priority=value
PushBullet works the similar way. Just check out the service you need, and customize the (Apprise) URL to your heart's content.
from nzb-notify.
Great!
But, I meant more in the way of the sabnzbd-notify.py
script:
Would there be a way to maybe include it in the URL which type of notification (e.g. shutdown
VS warning
) has which priority?
from nzb-notify.
No, that might have to happen on your end if you want to provide that level of granularity per action. You would need to adopt Apprise into SABnzbd and do away with the script. If you did this, you could then assign one or more (Apprise) URLs to pause
, start
, stop
, etc. From here you could even do things like where download
sends a message to say discord and twitter, while others send to different servers, or the same ones but with different configurations.
That said, i can brush myself up with how the script works again with SABnzbd and see if there is a way to do it through the CLI parameter parsing. If i recall (at the time, maybe not now though), the hand off of information from SAB to any script is somewhat limited. Under the hood, my script just get details on the notification (to send) and the one line of configuration users can provide to it via SAB (i use this for the Apprise URLs). Again, i might be very wrong here π
from nzb-notify.
Let me check if maybe we can do something to put it into the config-URL.
Just a quick thought: pover://credentials/?priority_download=value&priority_X=value
.
I will look into the parsing if I can add that on the nzb-notify side π
from nzb-notify.
Hmm, i'm not sure if that's a good idea. ... it just seems very specific and hacky...
Is there an advantage to controlling the priority per message? When you have 75+ services at your disposal, and you're putting so much effort into the handling of just 1 of them. Am i reading this right?
I can see an on/off type deal. Maybe the notify script could open up the SABnzbd configuration file and read back:
download: on, pause: off, etc
from some field and apply the filtering to all notifications?
But as i understand it, you're trying to achieve this with high, low, etc
.?
from nzb-notify.
There are more services supporting priorities right? So it would be for any that support it.
It happens to be supported for all of the services we have build in and are trying to remove (Growl/Pushbullet/Pushover). So users notice.
What about ?priority[download]=4
?
from nzb-notify.
Sure, but some priorities for some protocols take a value in its integer, some take med
, high
, or low
(for example Google FCM), so it really varies from service to service.
I would just hate to see you build a URL parser on top of a URL parser just to accommodate 1 of many services.
I'm wondering if we should leave your notification backend as is... drop support for SABnzbd notify script and just full integrate apprise into SABnzbd itself... You're interface would be as simple as:
- Apprise URL string (comma separated if more then one):
- a series of check-boxes to represent if they should trigger on
download
,pause
, etc
Or if you really want to get granular... repeat the above... but instead of a series of check-boxes (per action.. .such as download
, pause
, etc... it's a choice of:
on
off
custom
Where on/off are self explanatory... but custom requires you to provide the Apprise URL's again (to over-ride the global one). This will allow those who want to micro-mange the priories of the individual notices (or change who gets what can do so).
I can assure you that your code base will litterally shrink to:
import apprise
obj = apprise.Apprise()
obj.add('url-list-can-be-comma-separarted-even')
obj.notify('body', 'title')
# if there is an over-ride, to the action taking place... add that string of URL's instead of the master one
Food for thought anyhow...
from nzb-notify.
The reason to remove Growl/Pushover/Pushbullet from SABnzbd was to offload unnecessary features from SABnzbd so it can be a bit more lean. If we integrate Apprise, we sort of do the opposite, we increase the burden on SABnzbd.
We would have to package it in our installers, which is quite a lot of work to do reliably (for example due to binary components like PyYAML) and would increase the size of the binaries even more due to the extra requirements.
It would also mean that users would come to our forums first if there's problems.
Will try to make a proposal PR, I think you'll see what I intend is not that complicated π
from nzb-notify.
Sure, have at it and we can resume this conversation if needed. π
from nzb-notify.
See sabnzbd/2796.
Priorities are simply part of the defined Apprise URL... pover://credentials?priority=3
from nzb-notify.
Related Issues (20)
- error building wheel for PyYAML HOT 2
- Notification script returned exit code 1 and output "Traceback (most recent call last) HOT 21
- No failure notifications HOT 2
- Issue with SABnzbd on Mac HOT 6
- Issue with SABnzbd and Docker HOT 1
- Request: add support for SABnzbd "pause_resume" notifications HOT 5
- Create new release HOT 4
- Notify.py was not found!
- errors HOT 3
- name error HOT 1
- Error when running script on Windows 'no such file or directory' HOT 7
- Notify: Failed to send Telegram notification to -chatid: Bad Request: message is too long, error=400. HOT 2
- no notification on nzb file adding failure frm url HOT 4
- python3 HOT 1
- Missing Module 'nzbget' HOT 1
- exit code 127 and output "env: βpythonβ: No such file or directory " HOT 5
- Unable to use discord webhook default image for notifications HOT 5
- Problem running pip install -r requirements.txt HOT 1
- ImportError: No module named six HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nzb-notify.