Browse Source

Don't call parent init for synoindex

pull/3465/head
Ruud 11 years ago
parent
commit
8ae1e58614
  1. 3
      couchpotato/core/notifications/nmj.py
  2. 4
      couchpotato/core/notifications/synoindex.py

3
couchpotato/core/notifications/nmj.py

@ -22,10 +22,11 @@ class NMJ(Notification):
# noinspection PyMissingConstructor # noinspection PyMissingConstructor
def __init__(self): def __init__(self):
addEvent('renamer.after', self.addToLibrary)
addApiView(self.testNotifyName(), self.test) addApiView(self.testNotifyName(), self.test)
addApiView('notify.nmj.auto_config', self.autoConfig) addApiView('notify.nmj.auto_config', self.autoConfig)
addEvent('renamer.after', self.addToLibrary)
def autoConfig(self, host = 'localhost', **kwargs): def autoConfig(self, host = 'localhost', **kwargs):
mount = '' mount = ''

4
couchpotato/core/notifications/synoindex.py

@ -1,6 +1,7 @@
import os import os
import subprocess import subprocess
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent from couchpotato.core.event import addEvent
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification from couchpotato.core.notifications.base import Notification
@ -16,7 +17,8 @@ class Synoindex(Notification):
index_path = '/usr/syno/bin/synoindex' index_path = '/usr/syno/bin/synoindex'
def __init__(self): def __init__(self):
super(Synoindex, self).__init__() addApiView(self.testNotifyName(), self.test)
addEvent('renamer.after', self.addToLibrary) addEvent('renamer.after', self.addToLibrary)
def addToLibrary(self, message = None, group = None): def addToLibrary(self, message = None, group = None):

Loading…
Cancel
Save