Properly split and strip words. fixes #137
This commit is contained in:
@@ -56,7 +56,7 @@ class CoreNotifier(Notification):
|
||||
addEvent('library.update_finish', lambda data: fireEvent('notify.frontend', type = 'library.update', data = data))
|
||||
|
||||
def markAsRead(self):
|
||||
ids = getParam('ids').split(',')
|
||||
ids = [x.strip() for x in getParam('ids').split(',')]
|
||||
|
||||
db = get_session()
|
||||
|
||||
@@ -78,7 +78,7 @@ class CoreNotifier(Notification):
|
||||
q = db.query(Notif)
|
||||
|
||||
if limit_offset:
|
||||
splt = limit_offset.split(',')
|
||||
splt = [x.strip() for x in limit_offset.split(',')]
|
||||
limit = splt[0]
|
||||
offset = 0 if len(splt) is 1 else splt[1]
|
||||
q = q.limit(limit).offset(offset)
|
||||
|
||||
@@ -11,7 +11,7 @@ class NotifyMyAndroid(Notification):
|
||||
if self.isDisabled(): return
|
||||
|
||||
nma = pynma.PyNMA()
|
||||
keys = self.conf('api_key').split(',')
|
||||
keys = [x.strip() for x in self.conf('api_key').split(',')]
|
||||
nma.addkey(keys)
|
||||
nma.developerkey(self.conf('dev_key'))
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class NotifyMyWP(Notification):
|
||||
def notify(self, message = '', data = {}):
|
||||
if self.isDisabled(): return
|
||||
|
||||
keys = self.conf('api_key').split(',')
|
||||
keys = [x.strip() for x in self.conf('api_key').split(',')]
|
||||
p = PyNMWP(keys, self.conf('dev_key'))
|
||||
|
||||
response = p.push(application = self.default_title, event = message, description = message, priority = self.conf('priority'), batch_mode = len(keys) > 1)
|
||||
|
||||
Reference in New Issue
Block a user