[Schd-Script] DirWatch - Multiple NZB-File Drop Support

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.
l2g
Posts: 220
Joined: 27 Jun 2014, 22:13
Contact:

Re: [Schd-Script] DirWatch - Multiple NZB-File Drop Support

Post by l2g » 07 Mar 2017, 03:38

nzbget_fan wrote:The script is still not able to delete the .dw-files in the directory. I guess it has something to do how python accesses the windows file system. With Google's help I found this code

Code: Select all

import glob,os ; [os.remove(x) for x in glob.glob("D:\Test\*.dw")]
with which the script was able the .dw files. So I'm sure it's not because of folder or user rights (unless it has something to do with the default rights given to folders/files by windows).
If you want, just open up the script and change the references of unlink to remove (and add a from os import remove at the top) if you think it will help.
nzbget_fan wrote: But I ran in another problem where nzbget tells me after a soft start that the script is running in another session altough there's no other session of nzbget running. After stopping and starting the nzbget service the script is running, but I can't say for how long.
What is a soft start? A reload? Regardless, the script maintains a pid file and will never start a second instance if one is already detected as running. There is certainly not an issue at all here.
nzbget_fan wrote: I understand that's difficult for you to comprehend my issues without a windows test plttform. Even I'm not sure if you could comprehend the issues with a suitable test platform. With this in mind, I'm taking your idea for creating an own solution with a windows folder watch tool and a batch script. I still say thank you very much for your work, your support and the idea for the script.
I comprehend your issue quite clearly. You can run the script manually and it works, but through NZBGet it doesn't appear to have access to clean up the lingering files it's processed. I'd be interested in what the actual error message is that you get from the script; that would confirm this and make your issue much easier to debug. All that said, good luck with your own implementation; but consider the possibility that your new script could possibly only work from the command line and not through NZBGet too. If you feel like passing along more details, I'll gladly help debug more with you otherwise I completely respect your decision to move on! :)

toro143
Posts: 1
Joined: 24 Mar 2019, 17:07

"WatchDir" is preventing pc from sleeping

Post by toro143 » 24 Mar 2019, 17:22

Great script from Caronc,
anyway title says it all, recently plugged this in into nzbget setup and now my setup won't sleep.I narrowed it down to nzbget and the only recent change I made was adding "WatchDir". I understand the purpose of this is constantly scan additional folders (in my case, it a folder elsewhere on the network) so it's always running but I don't want it to keep my pc from going to sleep..
Is there any setting or tweak to script to let pc sleep ? Or must I abandon WatchDir and find another solution to move filess automatically ?

Would increasing the time watchdir scans to 30 mins and setting sleep timer if idle on pc to 20-25mins work ? That would let the pc sleep before next scan,, or is it the script itself (regardless of time) that keeps pc from sleeping ?

Thanks All
*** Edited a day or 2 later----- Apparently it had nothing to do with DirWatch, at the same time I plugged in DirWatch I had also updated NZBGet to a test build. It was the test build that wouldn't let my pc sleep,, Going back to stable 20.0 fixed the issue*****

l2g
Posts: 220
Joined: 27 Jun 2014, 22:13
Contact:

Re: [Schd-Script] DirWatch - Multiple NZB-File Drop Support

Post by l2g » Yesterday, 22:59

It's been a while, so I felt the need to update this script and slap a new build number on it.

Release v0.5.0 (Direct Download Link) is now in place.

The release details (and new documentation) can be found at the head of this thread (quick link).

Changes with this release:
  • Directory Watch files created to manage the handling of nzbfiles that might have already been handled.
  • Small bugfixes dating back to 2017 :oops:
  • Python 3 Support Added
  • it no longer ships with all of it's dependencies but instead includes a requirements.txt file. You will be required (just 1 time) to install them with

    Code: Select all

    pip install -r requirements.txt
    . While this may seem annoying, it only has to be done once.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest