History auto-purge

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
westcoast
Posts: 4
Joined: 25 Jun 2019, 06:44

Re: History auto-purge

Post by westcoast » 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.

ubt
Posts: 12
Joined: 14 Apr 2014, 19:55

Re: History auto-purge

Post by ubt » 21 Feb 2020, 03:08

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.

ubt
Posts: 12
Joined: 14 Apr 2014, 19:55

Re: History auto-purge

Post by ubt » 21 Feb 2020, 03:09

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.

DeadlyKnapsack
Posts: 8
Joined: 21 Nov 2015, 14:33

Re: History auto-purge

Post by DeadlyKnapsack » 05 Mar 2020, 20:38

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?

vateee
Posts: 1
Joined: 25 Oct 2020, 09:15

Re: History auto-purge

Post by vateee » 25 Oct 2020, 09:19

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

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests