Take your pp-script and change the signature to:l2g wrote:Can you give me just few quick points about Scheduler scripts?
Code: Select all
### NZBGET POST-PROCESSING/SCHEDULER SCRIPT
No, you use NZBPP_DIRECTORY to determine the mode. NZBPP_DIRECTORY is passed to pp-script but not to scheduler script. NZBPP_-vars hold nzb-file specific infos, which don't exist in scheduler script.l2g wrote:I understand your instructions involving the checking of NZBOP_DESTDIR to determine what mode i'm in.
Most options work in both mode, except for that root-path. Still if you want you can define option sections. PP-scripts usually have only one section "OPTIONS":l2g wrote:Yet it may be an option for the post-process part. Is there a way to separate the options apart... or just write 2 seperate scripts?
Code: Select all
### OPTIONS ###
Code: Select all
### GENERAL ###
#OneOption=yes
### SCHEDULER MODE ###
#Option_for_scheduler_mode=1
#Another_option_for_scheduler_mode=1
Code: Select all
from nzbget import PostProcessScript
from nzbget import SchedulerScript
class MyNZBGetScript(PostProcessScript, SchedulerScript):
def scheduler_main(self):
# all of your code here for schedule scripting
def postprocess_main(self):
# all of your code here for postprocess scripting
Should work now in attached filekloaknet wrote:first test of 003 on a random file:
info Mon Aug 04 2014 16:34:18 Subliminal: ImportError: No module named guessit
I appreciate you testing this, Please try the new release I attached.kloaknet wrote: Note also that windows 7 gives some error on the .zip file, 7zip works. (cannot open folder, file invalid)
hope to do some more testing this evening.
Code: Select all
sys.path.insert(0, join(dirname(dirname(__file__)), 'lib'))
Code: Select all
info Tue Aug 05 2014 01:33:35 Post-process-script subliminal-new/Subliminal.py for Californication.S07E01.HDTV.x264-EXCELLENCE skipped
info Tue Aug 05 2014 01:33:35 subliminal-new/Subliminal: 2014-08-05 01:33:35,392 - 23110 - WARNING - No subtitles were found.
info Tue Aug 05 2014 01:33:35 subliminal-new/Subliminal: 2014-08-05 01:33:35,380 - 23110 - INFO - Connected to SQLite Database
info Tue Aug 05 2014 01:33:35 subliminal-new/Subliminal: 2014-08-05 01:33:35,027 - 23110 - WARNING - NZB-File not found: /Volumes/Storage/Usenet-Downloads/Californication.S07E01.HDTV.x264-EXCELLENCE.nzb
info Tue Aug 05 2014 01:33:35 subliminal-new/Subliminal: 2014-08-05 01:33:35,026 - 23110 - INFO - Script Mode: POSTPROCESS
info Tue Aug 05 2014 01:33:34 Executing post-process-script subliminal-new/Subliminal.py for Californication.S07E01.HDTV.x264-EXCELLENCE
No problem, I just really appreciate what you are doing , and I am happy to test the stuff for you. No .zip error this time btw.l2g wrote: I appologize for submitting non-working stuff. I can't test this since it works for me because the missing libraries were available globally in my environment. I appreciate you guys testing this out, I"ll keep fixing what you find and i'll get a VM going soon with a better environment to test with in the future.
Code: Select all
error Tue Aug 05 2014 18:00:02 Post-process-script subliminal/Subliminal.py for Crossbones.S01E09.480p.HDTV.x264-REenCO failed (terminated with unknown status)
info Tue Aug 05 2014 18:00:02 Subliminal: ImportError: No module named pkg_resources
info Tue Aug 05 2014 18:00:02 Subliminal: import pkg_resources
info Tue Aug 05 2014 18:00:02 Subliminal: File "/share/Apps/NZBget/ppscripts/subliminal/lib/guessit/__init__.py", line 23, in <module>
info Tue Aug 05 2014 18:00:02 Subliminal: import guessit
info Tue Aug 05 2014 18:00:02 Subliminal: File "/share/Apps/NZBget/ppscripts/subliminal/Subliminal.py", line 117, in <module>
info Tue Aug 05 2014 18:00:02 Subliminal: Traceback (most recent call last):
info Tue Aug 05 2014 18:00:02 Executing post-process-script subliminal/Subliminal.py for Crossbones.S01E09.480p.HDTV.x264-REenCO
Users browsing this forum: Google [Bot] and 29 guests