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.
hugbug
Developer & Admin
Posts: 6710
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: History auto-purge

Post by hugbug » 09 Jan 2016, 00:07

If you wish more python - how about fixing of few issues in VideoSort? ;)
https://github.com/nzbget/VideoSort/issues

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

Re: History auto-purge

Post by DeadlyKnapsack » 25 Aug 2017, 10:01

I copied this script to a .py file, placed it in /scripts/ folder in nzbget and I can see it in nzbget, I can change the settings, but I cannot select it within a specific category. Is that by design? How can I configure it to run after a download is finished for example? I would like to have the history of a specific category to be hidden after the download has finished.

kloaknet
Posts: 316
Joined: 23 Jul 2014, 08:52

Re: History auto-purge

Post by kloaknet » 25 Aug 2017, 16:55

for testing, maybe use the in nzbget 19 introduced option to create a button on the script settings pages?

extensions scripts can now be executed from settings page (#50):
script authors define custom buttons;
when clicked the script is executed in a special mode and obtain extra parameters;
example script "Email.py" extended with button "Send test e-mail";
for details see Extension scripts: http://nzbget.net/extension-scripts#custom-commands

hugbug
Developer & Admin
Posts: 6710
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: History auto-purge

Post by hugbug » 25 Aug 2017, 17:09

This is a scheduler script. To enable it create a scheduler task with "Command=Script" and select the script in "Param" for that task. In the config of the script itself you can set which categories it should process.

Since this is a scheduler script it cleans up history on scheduled intervals, not directly after a download is completed.

cheepa
Posts: 28
Joined: 13 Dec 2013, 04:02

Re: History auto-purge

Post by cheepa » 26 Sep 2017, 17:04

i get a error message when using this script. CleanHistory: env: python2: No such file or directory nzbget. The category that is suppose to be delete is still in history. Im using nzbget 19.1 and on a Mac. I also have CleanHistory.py setup in scheduler. Anyone know why Im getting this error?

thanks.

hugbug
Developer & Admin
Posts: 6710
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: History auto-purge

Post by hugbug » 26 Sep 2017, 18:19

Check shebang. Make sure you can start the script from terminal before using in nzbget.

cheepa
Posts: 28
Joined: 13 Dec 2013, 04:02

Re: History auto-purge

Post by cheepa » 26 Sep 2017, 21:16

thanks hugbug. How would i run the script from terminal?

thanks

cheepa
Posts: 28
Joined: 13 Dec 2013, 04:02

Re: History auto-purge

Post by cheepa » 01 Oct 2017, 20:04

i was fiddling around with script and just notice i get a error "CleanHistory: ImportError: No module named jsonrpclib", does that error mean i don't have jsonrpclib installed on my computer?

hugbug
Developer & Admin
Posts: 6710
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: History auto-purge

Post by hugbug » 05 Oct 2017, 15:09

Yes, looks like this.
Example scripts Logger.py and Email.py illustrate how to communicate with nzbget using Xmlrpc module which is included in standard pyhon installation. I wonder why the author of purge script chose jsonrpc instead.

Take a look at Logger.py and replace jsonrpc with xmlrpc.

cheepa
Posts: 28
Joined: 13 Dec 2013, 04:02

Re: History auto-purge

Post by cheepa » 06 Oct 2017, 18:04

I sort of got the script to work. I don't get any errors but instead of deleting from the history tab, the script hides the particular category (when i click on the hidden tab the category reappears as "hidden") and there is no category listed for it. Is that what its suppose to do?

thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest