Page 4 of 5

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 20 Mar 2019, 14:05
by MrVideo
OK, I've downloaded the script file. Now what do I do with it, i.e., how do I install it? There are no installation instructions in the readme file.

I ask because the scripts directory (Linux) only contains two python files. The zip file contains a directory with more than just the unzip.py file.

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 20 Mar 2019, 14:24
by hugbug
Unpack everything into a new folder, it should contain script-file(s) and possibly other files and directories.
Then put that folder into ScritpDir.

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 20 Mar 2019, 14:51
by MrVideo
The zip contains a directory called "nzbgetpp-master," which I've copied to the installdir scripts location.

How does one now activate that script?

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 24 Mar 2019, 08:15
by MrVideo
Didn't work for me. Using the latest v21 beta.

In the Extensions setup page, I added unzip and then selected a couple of rar files that each contain a nzb file. The files were ignored. So, I then changed the setup page to say "nzbgetpp-master/unzip" and tried that; same result. The little timer icon lasts about a second and then nothing.

What do I have to do to get nzbget to unrar the selected rar file and extract the nzb file?

And yes, unzip shows up in the list on the bottom left of the web page.

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 26 Mar 2019, 12:33
by MrVideo
Got it to work!!!!!!

Two things were needed to be done. One was my fault and the other a problem with the distro.

1) When I manually entered the unzip name into the web settings, I failed to give the complete name with the ".py". When I used the CHOOSE button this time around, it did that. Silly me for not using the button in the first place. In the order option I added the .py as well.

2) Once the above was done and I tried it again, I got errors about permissions. Sure enough, the distro permissions were wrong for the three .py files, i.e., 664 instead on 775. Once I changed those, then it worked. The README file did not instruct the user to check and fix the permissions.

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 29 Mar 2019, 15:19
by prinz2311
The script has been coded on windows, which simply doesn't support permissions (and doesn't need them). Git on windows simply doesn't do permissions since the filesystem doesn't have linux permissions.

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 30 Mar 2019, 00:41
by MrVideo
That is true. But, NZBGet, and its scripts, are meant for multi-platforms. That means all platforms should be considered when releasing software, i.e., for platforms like Linux, permissions (or whatever) should be mentioned in installation instructions, or README files. That said, I should have noticed the permission issue. Since I don't normally run Python scripts, I didn't know that the script is directly run, instead of Python being run and the script supplied to it. So, it didn't stick out. Now I know. A heads up still would have been nice.

In any event, I really appreciate the script, as well as NZBGet. The combination makes downloading usenet files a breeze.

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 24 Nov 2019, 13:10
by Krocko
This script don't work if a '@' ore ‘€‘ is in the filename.
Is there a way to fix this?

Code: Select all

INFO	Sun Nov 24 2019 14:03:26	unzip: UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position 56: ordinal not in range(128)
INFO	Sun Nov 24 2019 14:03:26	unzip: self._fd = open(xfile, 'rb', bufsize)
INFO	Sun Nov 24 2019 14:03:26	unzip: File "/volume1/downloads/scripts/rarfile/rarfile.py", line 2385, in __init__
INFO	Sun Nov 24 2019 14:03:26	unzip: with XFile(xfile) as fd:
INFO	Sun Nov 24 2019 14:03:26	unzip: File "/volume1/downloads/scripts/rarfile/rarfile.py", line 385, in _get_rar_version
INFO	Sun Nov 24 2019 14:03:26	unzip: ver = _get_rar_version(self._rarfile)
INFO	Sun Nov 24 2019 14:03:26	unzip: File "/volume1/downloads/scripts/rarfile/rarfile.py", line 838, in _parse
INFO	Sun Nov 24 2019 14:03:26	unzip: self._parse()
INFO	Sun Nov 24 2019 14:03:26	unzip: File "/volume1/downloads/scripts/rarfile/rarfile.py", line 662, in __init__
INFO	Sun Nov 24 2019 14:03:26	unzip: rarf = rarfile.RarFile(filename, mode='r')
INFO	Sun Nov 24 2019 14:03:26	unzip: File "/volume1/downloads/scripts/unzip.py", line 302, in <module>
INFO	Sun Nov 24 2019 14:03:26	unzip: Traceback (most recent call last):
INFO	Sun Nov 24 2019 14:03:26	Executing scan-script unzip.py for xxxxxxx@xxxxxx€xxxxxxxx.rar

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 14 Dec 2019, 01:59
by prinz2311
Pushed update. Should fix this unicode (rarlib + python 2) issue on Windows. Also added python 3.7+ support

Re: [Scan-Script] Add packed nzb-files to queue

Posted: 16 Dec 2019, 07:12
by MrVideo
There are a lot of characters that are not liked: < > ! $ to name a few.