Page 3 of 3

Re: History auto-purge

Posted: 27 Jun 2019, 08:14
by westcoast
is there a way to run this script automatically after nzbget is finished downloading a file. So that the specific category won't be added in the history section in nzbget?

thanks.

Re: History auto-purge

Posted: 21 Feb 2020, 03:08
by ubt
hugbug wrote:
05 Oct 2017, 15:09
I wonder why the author of purge script chose jsonrpc instead.
Just newb ignorance. I think this was literally the first time I ever attempted anything in Python. Had some time to kill today and dropped jsonrpc.

Re: History auto-purge

Posted: 21 Feb 2020, 03:09
by ubt
westcoast wrote:
27 Jun 2019, 08:14
is there a way to run this script automatically after nzbget is finished downloading a file. So that the specific category won't be added in the history section in nzbget?

thanks.
No, although this would be ideal. Post-processing scripts cannot act upon themselves.

Re: History auto-purge

Posted: 05 Mar 2020, 20:38
by DeadlyKnapsack
I can't seem to get this to work. Running NZBGet in a Docker Container on a Synology NAS. I created a Scheduler Task, but the script isn't executed. It's located in the ScriptDir and I can select the CleanHistory.py script in the Scheduler Task options. What am I doing wrong?

Re: History auto-purge

Posted: 25 Oct 2020, 09:19
by vateee
To fix the script so it works with python3 you need to change the imports to this:

Code: Select all

import os
import sys

try:
  from xmlrpclib import ServerProxy # python 2
  from urllib2 import quote
except ImportError:
  from xmlrpc.client import ServerProxy # python 3
  from urllib.parse import quote