Code Monkey home page Code Monkey logo

Comments (10)

caronc avatar caronc commented on May 24, 2024

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.

The whole list of services

from nzb-notify.

Safihre avatar Safihre commented on May 24, 2024

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.

caronc avatar caronc commented on May 24, 2024

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.

Safihre avatar Safihre commented on May 24, 2024

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.

caronc avatar caronc commented on May 24, 2024

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.

Safihre avatar Safihre commented on May 24, 2024

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.

caronc avatar caronc commented on May 24, 2024

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:

  1. Apprise URL string (comma separated if more then one):
  2. 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.

Safihre avatar Safihre commented on May 24, 2024

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.

caronc avatar caronc commented on May 24, 2024

Sure, have at it and we can resume this conversation if needed. πŸ‘

from nzb-notify.

caronc avatar caronc commented on May 24, 2024

See sabnzbd/2796.

Priorities are simply part of the defined Apprise URL... pover://credentials?priority=3

from nzb-notify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.