Mark as failed
Posted: March 8th, 2016, 11:58 am
Hello,
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.
My script:
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.
My script:
Code: Select all
# -*- 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)