From 2406e9ef8554532849b48a9b8644fce243e4f13d Mon Sep 17 00:00:00 2001 From: mano3m <-> Date: Tue, 24 Jul 2012 23:27:26 +0200 Subject: [PATCH] Fixed NMJ test --- couchpotato/core/notifications/nmj/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/notifications/nmj/main.py b/couchpotato/core/notifications/nmj/main.py index 8f0e201d..1a794fbe 100644 --- a/couchpotato/core/notifications/nmj/main.py +++ b/couchpotato/core/notifications/nmj/main.py @@ -19,7 +19,7 @@ class NMJ(Notification): def __init__(self): addEvent('renamer.after', self.addToLibrary) - + addApiView(self.testNotifyName(), self.test) addApiView('notify.nmj.auto_config', self.autoConfig) def autoConfig(self): @@ -76,7 +76,7 @@ class NMJ(Notification): mount = self.conf('mount') database = self.conf('database') - if self.mount: + if mount: log.debug('Try to mount network drive via url: %s', (mount)) try: data = self.urlopen(mount) @@ -114,3 +114,8 @@ class NMJ(Notification): def failed(self): return jsonified({'success': False}) + + def test(self): + return jsonified({'success': self.addToLibrary()}) + +