Fixed NMJ test
This commit is contained in:
@@ -19,7 +19,7 @@ class NMJ(Notification):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
addEvent('renamer.after', self.addToLibrary)
|
addEvent('renamer.after', self.addToLibrary)
|
||||||
|
addApiView(self.testNotifyName(), self.test)
|
||||||
addApiView('notify.nmj.auto_config', self.autoConfig)
|
addApiView('notify.nmj.auto_config', self.autoConfig)
|
||||||
|
|
||||||
def autoConfig(self):
|
def autoConfig(self):
|
||||||
@@ -76,7 +76,7 @@ class NMJ(Notification):
|
|||||||
mount = self.conf('mount')
|
mount = self.conf('mount')
|
||||||
database = self.conf('database')
|
database = self.conf('database')
|
||||||
|
|
||||||
if self.mount:
|
if mount:
|
||||||
log.debug('Try to mount network drive via url: %s', (mount))
|
log.debug('Try to mount network drive via url: %s', (mount))
|
||||||
try:
|
try:
|
||||||
data = self.urlopen(mount)
|
data = self.urlopen(mount)
|
||||||
@@ -114,3 +114,8 @@ class NMJ(Notification):
|
|||||||
|
|
||||||
def failed(self):
|
def failed(self):
|
||||||
return jsonified({'success': False})
|
return jsonified({'success': False})
|
||||||
|
|
||||||
|
def test(self):
|
||||||
|
return jsonified({'success': self.addToLibrary()})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user