[SQS-Script] Completion-Propagation/DMCA/Retention check

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.
arcturu5
Posts: 1
Joined: 07 Mar 2018, 20:54

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by arcturu5 » 07 Mar 2018, 22:27

Hello. Just found out about this script and downloaded it yesterday.

To clarify about MaxFailure, if I enter 20 that means up to 20% of the articles on a server can be failures but the download will still be attempted, correct? The use of the variable X in the description is confusing me.

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

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by kloaknet » 10 Mar 2018, 13:46

"When more than X percentage fails on your main news-server, the NZB is skipped to avoid burning through fill servers."

douche
Posts: 45
Joined: 08 Feb 2014, 23:50

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by douche » 30 Mar 2018, 04:59

Is it somehow possible to for this script to simply do a completion check on the entire queue, but not start anything for download?

I have a selection of NZBs that I want/need to download, but want to check their completion before downloading, and I want to download at my leisure.
As it stands, this script only will scan one file at a time then start it downloading, and wait for it to complete before going to the next.

Yes, I could use NZBcc, but it seems to give an awful lot of article errors, when in reality, there are none...

Thanks

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

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by kloaknet » 30 Mar 2018, 18:27

douche wrote:
30 Mar 2018, 04:59
Is it somehow possible to for this script to simply do a completion check on the entire queue, but not start anything for download?

I have a selection of NZBs that I want/need to download, but want to check their completion before downloading, and I want to download at my leisure.
As it stands, this script only will scan one file at a time then start it downloading, and wait for it to complete before going to the next.

Yes, I could use NZBcc, but it seems to give an awful lot of article errors, when in reality, there are none...

Thanks
Short answer: no

long answer: yes, but you need to modify the script, especially the code for

Code: Select all

def unpause_nzb(nzb_id):
def unpause_nzb_dupe(dupe_nzb_id, nzb_id):
change those respectively to make them work like:

Code: Select all

def mark_bad(nzb_id):
def mark_bad_dupe(dupe_nzb_id):
but then use the historymarkgood option (in the unpause sections) instead of the historymarkbad, so they will appear GOOD in the history, and you can then later return them back to the queue.

Otherways must be possible to, but you will need to dive into the code.

douche
Posts: 45
Joined: 08 Feb 2014, 23:50

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by douche » 05 Apr 2018, 01:42

kloaknet wrote:
30 Mar 2018, 18:27
douche wrote:
30 Mar 2018, 04:59
Is it somehow possible to for this script to simply do a completion check on the entire queue, but not start anything for download?

I have a selection of NZBs that I want/need to download, but want to check their completion before downloading, and I want to download at my leisure.
As it stands, this script only will scan one file at a time then start it downloading, and wait for it to complete before going to the next.

Yes, I could use NZBcc, but it seems to give an awful lot of article errors, when in reality, there are none...

Thanks
Short answer: no

long answer: yes, but you need to modify the script, especially the code for

Code: Select all

def unpause_nzb(nzb_id):
def unpause_nzb_dupe(dupe_nzb_id, nzb_id):
change those respectively to make them work like:

Code: Select all

def mark_bad(nzb_id):
def mark_bad_dupe(dupe_nzb_id):
but then use the historymarkgood option (in the unpause sections) instead of the historymarkbad, so they will appear GOOD in the history, and you can then later return them back to the queue.

Otherways must be possible to, but you will need to dive into the code.
I'll give that a try soon, just working on clearing some backlog.

thanks

dgcurtis
Posts: 28
Joined: 09 Sep 2014, 15:11

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by dgcurtis » 08 May 2018, 01:22

I am running nzbget on CentOS 7 so I had to compile python 2.7.15.

I changed Completion.py to use the newly compiled python binary but I'm getting this in the logs:

Mon May 7 21:15:00 2018 INFO Executing scheduler-script Completion.py
Mon May 7 21:15:00 2018 INFO Completion: Traceback (most recent call last):
Mon May 7 21:15:00 2018 INFO Completion: File "/opt/nzbget/scripts/Completion.py", line 1703, in <module>
Mon May 7 21:15:00 2018 INFO Completion: main()
Mon May 7 21:15:00 2018 INFO Completion: File "/opt/nzbget/scripts/Completion.py", line 1677, in main
Mon May 7 21:15:00 2018 INFO Completion: if 'NZBSP_TASKID' in os.environ: scheduler_call()
Mon May 7 21:15:00 2018 INFO Completion: File "/opt/nzbget/scripts/Completion.py", line 1547, in scheduler_call
Mon May 7 21:15:00 2018 INFO Completion: if not lock_file(): # check if script is not already running
Mon May 7 21:15:00 2018 INFO Completion: File "/opt/nzbget/scripts/Completion.py", line 1317, in lock_file
Mon May 7 21:15:00 2018 INFO Completion: nzbget_status = NZBGet.status() # Get NZB status info XML-RPC
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/xmlrpclib.py", line 1243, in __call__
Mon May 7 21:15:00 2018 INFO Completion: return self.__send(self.__name, args)
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/xmlrpclib.py", line 1602, in __request
Mon May 7 21:15:00 2018 INFO Completion: verbose=self.__verbose
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/xmlrpclib.py", line 1283, in request
Mon May 7 21:15:00 2018 INFO Completion: return self.single_request(host, handler, request_body, verbose)
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/xmlrpclib.py", line 1311, in single_request
Mon May 7 21:15:00 2018 INFO Completion: self.send_content(h, request_body)
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/xmlrpclib.py", line 1459, in send_content
Mon May 7 21:15:00 2018 INFO Completion: connection.endheaders(request_body)
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/httplib.py", line 1038, in endheaders
Mon May 7 21:15:00 2018 INFO Completion: self._send_output(message_body)
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/httplib.py", line 882, in _send_output
Mon May 7 21:15:00 2018 INFO Completion: self.send(msg)
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/httplib.py", line 844, in send
Mon May 7 21:15:00 2018 INFO Completion: self.connect()
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/httplib.py", line 821, in connect
Mon May 7 21:15:00 2018 INFO Completion: self.timeout, self.source_address)
Mon May 7 21:15:00 2018 INFO Completion: File "/usr/local/python27/lib/python2.7/socket.py", line 557, in create_connection
Mon May 7 21:15:00 2018 INFO Completion: for res in getaddrinfo(host, port, 0, SOCK_STREAM):
Mon May 7 21:15:00 2018 INFO Completion: socket.gaierror: [Errno -2] Name or service not known

Thanks!

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

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by kloaknet » 13 May 2018, 07:18

I am sorry, but I don't think I can help you with this error. Not that experienced, but it looks like an library error? It seems to go wrong at a very standard call towards nzbget asking for some xml data.

tintin
Posts: 3
Joined: 21 Aug 2018, 06:56

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by tintin » 21 Aug 2018, 07:07

Hello, I've just discovered this script. I've installed 1.1 successfully, but it looks like I'm missing something.

Completion check is either being skipped and never called again, or the nzb is seen as invalid while nzbget is downloading that same nzb file just fine.

Code: Select all

Tue Aug 21 2018 07:58:07	INFO	Completion: [V] New completion.lock file created.
Tue Aug 21 2018 07:58:07	INFO	Completion: [V] Maximum priority of DOWNLOADING / QUEUED NZBs = 0
Tue Aug 21 2018 07:58:07	INFO	Completion: [V] QUEUED / DOWNLOADING NZBs have higher or equal priority than by script paused items, skipping check
Tue Aug 21 2018 07:58:07	INFO	Completion: [V] del_lock_file()
Tue Aug 21 2018 07:58:07	INFO	Completion: [V] completion.lock file deleted

Code: Select all

Tue Aug 21 2018 07:51:51	INFO	Completion: Checking: "redacted.nzb.queued"
Tue Aug 21 2018 07:51:51	INFO	Completion: [V] get_nzb_data(fname=/nzb/watch/redacted.nzb.queued)
Tue Aug 21 2018 07:51:51	ERROR	Completion: No group found in NZB file.
Tue Aug 21 2018 07:51:51	INFO	Completion: [V] group: None
Tue Aug 21 2018 07:51:51	WARNING	Completion: The NZB file redacted.nzb.queued appears to be invalid, resuming NZB.
Tue Aug 21 2018 07:51:51	INFO	Completion: Overall check completed in 0.05 sec.
Tue Aug 21 2018 07:51:51	INFO	Completion: [V] nzbget_resume()
Tue Aug 21 2018 07:51:51	INFO	Completion: [V] Downloading for NZBGet resumed
Tue Aug 21 2018 07:51:51	INFO	Completion: [V] del_lock_file()
Tue Aug 21 2018 07:51:51	INFO	Completion: [V] completion.lock file deleted

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

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by kloaknet » 25 Aug 2018, 09:35

First issue is because something is already being downloaded, and the by the script paused items have a lower priority, so only when that item(s) is gone, it will check and unpause.

2nd one seems to be related to an invalid/odd nzb file.

tintin
Posts: 3
Joined: 21 Aug 2018, 06:56

Re: [SQS-Script] Completion-Propagation/DMCA/Retention check

Post by tintin » 25 Aug 2018, 12:36

The nzb is valid. nzbget is able to process it just fine. I'm adding nzb through the watch directory feature, may be the script is trying to read the nzb file while it's still being downloaded?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests