Feature request: read NZB file in import folder from rar/zip

Post Reply
tijgert
Posts: 56
Joined: Wed Sep 10, 2003 11:51 am
Location: Amsterdam
Contact:

Feature request: read NZB file in import folder from rar/zip

Post by tijgert »

In line with remote administration of UE I have the following request/suggestion.

NZB's are very compressible due to it being just plain ASCII text.
Sending a 31MB UHD movie NZB from a remote location can be a real pain when the connection drops (it happened more than once to me).
When you compress it into a rar archive that NZB is reduced to just 1.8MB.

Could you make UE recognize RAR archives in the Import folder and read the NZB's inside the archive?

(zip could work too, but RAR compresses much better)
alex
Posts: 4538
Joined: Thu Feb 27, 2003 5:57 pm

Re: Feature request: read NZB file in import folder from rar

Post by alex »

Maybe to consider running a third party auto unrar utiliy look e.g here:

https://www.ghacks.net/2011/09/14/unpac ... -archives/

If it doesn't work for the same reason why we added the delay - let it unrar from the import "done" subfolder,

If I remember it right - whatever is the file extension the delay will be always applied and only during processing even if it is not .nzb it will be still moved to the "done" subfolder on which you can run an auto unrar utility of your choice.
tijgert
Posts: 56
Joined: Wed Sep 10, 2003 11:51 am
Location: Amsterdam
Contact:

Re: Feature request: read NZB file in import folder from rar

Post by tijgert »

Hi Alex,
I think this program will do exactly what I had in mind, uploading archives and have it imported into UE. Having another program and task running and the ‘risk’ of forgetting to launch it when I start UE is just a minor nuisance.
Thanks for pointing it out to me :D

Just out of curiosity though, would creating such a feature inside UE be a lot of work? I mean, would it require to incorporate some sort of DLL for the unpack routine and/or would it require some sort of software license to use that (de)compression algorithm?
And would it also be a separate thread on the system? How would that work?
alex
Posts: 4538
Joined: Thu Feb 27, 2003 5:57 pm

Re: Feature request: read NZB file in import folder from rar

Post by alex »

UE has unrar code built in. It is always run in one thread which does save and unpack, I'm not sure if there are static variables.

Technically it would maybe need a separate thread, since import of nzb files runs in the main thread, but from other side unrar of such small files is fast, so probably it could be done in the main thread.

As to my suggestion such auto unrar program should not consume much resources, so it can always run on background while the system is running, so just to monitor the import "done" subfolder and when it finds .rar there - to unrar it into the import folder.

The question is I don't know where rared nzb files are used elsewhere, so it would be maybe too much customization to add such an option in settings, as normally .rar files should be ignored. E.g. it could be limited to *.nzb.rar files, but such combined extension is just not used in real life.
tijgert
Posts: 56
Joined: Wed Sep 10, 2003 11:51 am
Location: Amsterdam
Contact:

Re: Feature request: read NZB file in import folder from rar

Post by tijgert »

Unfortunately it seems UnpackMonitor doesn't work anymore and quite a lot of similar programs as well... forums down, error starting it up or no action whatsoever. Seems MS had changed a few things around or something and crippled many old software. Oh well, thanks for the tip though.
alex
Posts: 4538
Joined: Thu Feb 27, 2003 5:57 pm

Re: Feature request: read NZB file in import folder from rar

Post by alex »

It can be done using "unrar command prompt" (download it from winrar website) and a simple .bat file.

Create this batch file e.g. unrar.bat, in the batch file change the drive and the "done" directory path to yours:

@echo off
d:
cd d:\import\done
:loop
for %%f in (*.rar) do (
unrar.exe x -y %%f ..
del %%f /q
)
timeout 10
goto loop

Then copy unrar.exe (unrar command prompt) into the "done" directory, launch the batch file when UE is running and it should do what you need.

You may omit @echo off to see how it works, change unrar.exe directory and add import and done directories to its parameters etc.

So it is pretty trivial, I checked and it works.
Post Reply