diff options
author | morpheus65535 <[email protected]> | 2021-12-01 21:19:18 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-12-01 21:19:18 -0500 |
commit | d51dc68ebb3910ca09bb40c33814d43b93d916b8 (patch) | |
tree | 569807abb70b41eb98dded56c17bd504e793da5b /libs/apprise/plugins/NotifyGnome.py | |
parent | 402c82d84f7bd51353348bea7d1a876ad9ecc5b1 (diff) | |
download | bazarr-d51dc68ebb3910ca09bb40c33814d43b93d916b8.tar.gz bazarr-d51dc68ebb3910ca09bb40c33814d43b93d916b8.zip |
Updated Apprise notification module to the latest providers.v1.0.2-beta.2
Diffstat (limited to 'libs/apprise/plugins/NotifyGnome.py')
-rw-r--r-- | libs/apprise/plugins/NotifyGnome.py | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/libs/apprise/plugins/NotifyGnome.py b/libs/apprise/plugins/NotifyGnome.py index 4f5e58606..6317c0d54 100644 --- a/libs/apprise/plugins/NotifyGnome.py +++ b/libs/apprise/plugins/NotifyGnome.py @@ -78,8 +78,19 @@ class NotifyGnome(NotifyBase): A wrapper for local Gnome Notifications """ + # Set our global enabled flag + enabled = NOTIFY_GNOME_SUPPORT_ENABLED + + requirements = { + # Define our required packaging in order to work + 'details': _('A local Gnome environment is required.') + } + # The default descriptive name associated with the Notification - service_name = 'Gnome Notification' + service_name = _('Gnome Notification') + + # The service URL + service_url = 'https://www.gnome.org/' # The default protocol protocol = 'gnome' @@ -102,15 +113,6 @@ class NotifyGnome(NotifyBase): # cause any title (if defined) to get placed into the message body. title_maxlen = 0 - # This entry is a bit hacky, but it allows us to unit-test this library - # in an environment that simply doesn't have the gnome packages - # available to us. It also allows us to handle situations where the - # packages actually are present but we need to test that they aren't. - # If anyone is seeing this had knows a better way of testing this - # outside of what is defined in test/test_gnome_plugin.py, please - # let me know! :) - _enabled = NOTIFY_GNOME_SUPPORT_ENABLED - # Define object templates templates = ( '{schema}://', @@ -157,11 +159,6 @@ class NotifyGnome(NotifyBase): Perform Gnome Notification """ - if not self._enabled: - self.logger.warning( - "Gnome Notifications are not supported by this system.") - return False - try: # App initialization Notify.init(self.app_id) |