Enabler option
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from couchpotato.core.event import addEvent
|
||||
from couchpotato.core.helpers.request import jsonified
|
||||
from couchpotato.core.plugins.base import Plugin
|
||||
from couchpotato.environment import Env
|
||||
|
||||
|
||||
class Notification(Plugin):
|
||||
|
||||
@@ -14,9 +14,6 @@ class Notification(Plugin):
|
||||
def notify(self, message = '', data = {}):
|
||||
pass
|
||||
|
||||
def conf(self, attr):
|
||||
return Env.setting(attr, self.__class__.__name__.lower())
|
||||
|
||||
def isDisabled(self):
|
||||
return not self.isEnabled()
|
||||
|
||||
|
||||
@@ -12,20 +12,16 @@ config = [{
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
'default': False,
|
||||
'default': 0,
|
||||
'type': 'enabler',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'host',
|
||||
'default': 'localhost',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'password',
|
||||
'default': '',
|
||||
'type': 'password',
|
||||
'description': '',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -13,23 +13,18 @@ config = [{
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
'default': False,
|
||||
'default': 0,
|
||||
'type': 'enabler',
|
||||
},
|
||||
{
|
||||
'name': 'host',
|
||||
'default': 'localhost',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'database',
|
||||
'default': '',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'mount',
|
||||
'default': '',
|
||||
'description': '',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -13,17 +13,14 @@ config = [{
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
'default': False,
|
||||
'default': 0,
|
||||
'type': 'enabler',
|
||||
},
|
||||
{
|
||||
'name': 'username',
|
||||
'default': '',
|
||||
'type': 'string',
|
||||
},
|
||||
{
|
||||
'name': 'password',
|
||||
'default': '',
|
||||
'type': 'password',
|
||||
},
|
||||
],
|
||||
|
||||
@@ -12,20 +12,16 @@ config = [{
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
'default': False,
|
||||
'default': 0,
|
||||
'type': 'enabler',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'host',
|
||||
'default': 'localhost',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'password',
|
||||
'default': '',
|
||||
'type': 'password',
|
||||
'description': '',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -12,21 +12,17 @@ config = [{
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
'default': False,
|
||||
'default': 0,
|
||||
'type': 'enabler',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'api_key',
|
||||
'default': '',
|
||||
'label': 'Api key',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'priority',
|
||||
'default': '0',
|
||||
'type': 'dropdown',
|
||||
'description': '',
|
||||
'values': [('Very Low', -2), ('Moderate', -1), ('Normal', 0), ('High', 1), ('Emergency', 2)]
|
||||
},
|
||||
],
|
||||
|
||||
@@ -12,25 +12,21 @@ config = [{
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
'default': False,
|
||||
'default': 0,
|
||||
'type': 'enabler',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'host',
|
||||
'default': 'localhost:8080',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'username',
|
||||
'default': 'xbmc',
|
||||
'description': '',
|
||||
},
|
||||
{
|
||||
'name': 'password',
|
||||
'default': 'xbmc',
|
||||
'type': 'password',
|
||||
'description': '',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user