merci de ta réponse . mais tu pourrais m'éclairer un peu plus s'il te plait.
j'ai vu un code effectivement:
mais j'en fais quoi? , je le met ou et comment on fait pour le declencher
si tu pouvais me guider un peu plus je te serais reconnaissant
merci d'avance.
+# URL:http://code.google.com/p/sickbeard/
+#
+# This file is partof Sick Beard.
+#
+# Sick Beard is freesoftware: you can redistribute it and/or modify
+# it under the termsof the GNU General Public License as published by
+# the Free SoftwareFoundation, either version 3 of the License, or
+# (at your option)any later version.
+#
+# Sick Beard isdistributed in the hope that it will be useful,
+# but WITHOUT ANYWARRANTY; without even the implied warranty of
+# MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE. Seethe
+# GNU General PublicLicense for more details.
+#
+# You should havereceived a copy of the GNU General Public License
+# along with SickBeard. If not, see<http://www.gnu.org/licenses/>.
+
+
+
+import os
+import subprocess
+
+import sickbeard
+
+from sickbeard importlogger
+from sickbeard importencodingKludge as ek
+
+classsynoIndexNotifier:
+
+ def notify_snatch(self, ep_name):
+ pass
+
+ def notify_download(self, ep_name):
+ pass
+
+ def update_library(self, ep_obj):
+ if sickbeard.USE_SYNOINDEX:
+ synoindex_cmd =['/usr/syno/bin/synoindex', '-a', ek.ek(os.path.abspath, ep_obj.location)]
+ logger.log(u"Executing command"+str(synoindex_cmd))
+ logger.log(u"Absolute path tocommand: "+ek.ek(os.path.abspath, synoindex_cmd[0]), logger.DEBUG)
+ try:
+ p = subprocess.Popen(synoindex_cmd,stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=sickbeard.PROG_DIR)
+ out, err = p.communicate()#@UnusedVariable
+ logger.log(u"Scriptresult: "+str(out), logger.DEBUG)
+ except OSError, e:
+ logger.log(u"Unable to run synoindex: "+ex(e))
+
+notifier = synoIndexNotifier