I wrote a pre-queue script to allow or refuse a ".nzb", depending of the group where the files have been posted. It works as expected but now, I want to mark the ".nzb" as failed instead of just delete it. I use Sonarr and Sonarr need to know if a download failed before trying another release.
# -*- coding: utf-8 -*-
import sys
groups = tuple(sys.argv[7].split(' '))
if sys.argv[3] == 'tv':
if 'alt.binaries.teevee' not in groups:
print 0
sys.exit(0)
elif sys.argv[3] == 'movies':
if 'alt.binaries.moovee' not in groups:
print 0
sys.exit(0)
Last edited by qwdrty on March 8th, 2016, 9:05 pm, edited 6 times in total.
# -*- coding: utf-8 -*-
import sys
groups = tuple(sys.argv[7].split(' '))
if sys.argv[3] == 'tv':
if 'alt.binaries.teevee' not in groups:
print 0
sys.exit(0)
elif sys.argv[3] == 'movies':
if 'alt.binaries.moovee' not in groups:
print 0
sys.exit(0)
So, I want to mark the file as failed in my history, when the script return 0.
Hmm.
Currently 0=discard, 1=accept.
Adding 2=accept+fail would be a compatible extension.
I'll give it a thought.
You can help us remember it by filing an issue in github (https://github.com/sabnzbd/sabnzbd/issues)