Still looking for a way to execute program after unrar

Technical support and discussion of Newsbin Version 6 series.

Still looking for a way to execute program after unrar

Postby mkanet » Thu Oct 04, 2012 12:25 am

I had inquired about a way to execute a batch file/exe after successful unrar a while back. I'm curious if there is a pre-release beta version of newbin that can do this. It's getting tiresome to manually delete files and rename files after each download; which it can easily be done by an automated process.

Honestly, the only reason I'm not using SABnzbd (which has been able to do this for years) is because I've never been thrilled with using a web browser for it's interface.
mkanet
Active Participant
Active Participant
 
Posts: 98
Joined: Mon Jan 29, 2007 2:16 pm

Re: Still looking for a way to execute program after unrar

Postby DThor » Thu Oct 04, 2012 7:58 am

AFAIK no, nothing in a prerelease with this. I am curious how you could do something easily given there's no guarantee that one extraction creates a single file. What do you do with all the posts that create multiple files, potentially in subfolders? I'm not sure it's trivial at all.

Anyway, that aside, I'm assuming it's more than simply a slot to 'insert command here', it likely needs newsbin passing parameters too, no? What exactly would you want passed?

DT
V6 Troubleshooting FAQ . V6 docs. Usenet info at Usenet Tools. Thanks!
User avatar
DThor
Elite NewsBin User
Elite NewsBin User
 
Posts: 5943
Joined: Mon Jul 01, 2002 9:50 am

Registered Newsbin User since: 04/01/03

Re: Still looking for a way to execute program after unrar

Postby mkanet » Thu Oct 04, 2012 7:24 pm

For my needs, I dont need anything except for it to simply execute a batch file or exe after unraring is done. That should be extremely easy to add.

This will allow people to add windows batch files that do various things automatically (which don't need any command line parameters) Such as:

1. Download directory cleanup... Delete files like *.srr, *.nfo, *.txt, etc.
2. Renames any recognizable media file in IMDB/themovieDB. Smart renamers can rename any media file you can throw at it; all it needs is the download directory path which can be pre-defined in the batch file.

Later down the road, when there's more time, Newbin can add command-line parameters or more elaborate functions equivalent to other news readers. But, starting off with just a simple file execute would be nice.
mkanet
Active Participant
Active Participant
 
Posts: 98
Joined: Mon Jan 29, 2007 2:16 pm

Re: Still looking for a way to execute program after unrar

Postby DThor » Fri Oct 05, 2012 8:36 am

I don't think it's such a bad idea to let a user run a program after an event, but I think you need to allow for the fact that a complete mess could start happening unless a little thought is put into the feature before implementing. I know from your perspective it's 'easy to add' that initial simple stage, but the newsbin guys need to be cognizant of tons of support issues that could crop up. Renaming, copying, deleting throughout the download folder while new material is being downloaded live, and happening after every download? I would want it restricted to what just got downloaded, given it's extraction is the trigger to run the script. Otherwise, if constant processing like that is desired, I'd just put the script on a timer outside of newsbin and have it run every x minutes. It sounds to me that this could cover your initial implementation scenario fairly closely. Plus, can you imagine the disaster that would happen if a user decided to download 1000 single chunk pictures on a whim, forgetting about that being set?

Anyway, I get your point, Quade may well have it on his list.

DT
V6 Troubleshooting FAQ . V6 docs. Usenet info at Usenet Tools. Thanks!
User avatar
DThor
Elite NewsBin User
Elite NewsBin User
 
Posts: 5943
Joined: Mon Jul 01, 2002 9:50 am

Registered Newsbin User since: 04/01/03

Re: Still looking for a way to execute program after unrar

Postby Quade » Fri Oct 05, 2012 11:23 am

I'm not against the idea. I suspect it'll be more complex than you make out though. Once it's working, I suspect people will want to know things like the path where the unrared files ended up and the like.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44984
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Still looking for a way to execute program after unrar

Postby mkanet » Fri Oct 05, 2012 3:23 pm

Yeah, I already tried that method... to blindly run at regular intervals. The whole point would be to have the script do it's job right immediately after movie/tv media files are available. I wouldn't want to wait until the next time the script runs. If the script runs too often, it can interfere during the .tmp folder rar unarchiving process. It wouldn't be a good idea to run the script for nzbs that only have multi-part rar files (not single pictures). Also, it wouldn't be a good idea to run the script if there is an active download in progress.

I currently use a good directory monitoring tool that processes the script once it detects a new media file in the downloads folder. But, seems to have a problem with processing the media files that are in the .tmp unrar directory (while newbin unraring is still in progress).

But, yeah... it looks like its definitely not as simple as I originally thought (sorry being so naive). Thanks so much for your consideration!

DThor wrote:I'd just put the script on a timer outside of newsbin and have it run every x minutes. It sounds to me that this could cover your initial implementation scenario fairly closely. Plus, can you imagine the disaster that would happen if a user decided to download 1000 single chunk pictures on a whim, forgetting about that being set?

Anyway, I get your point, Quade may well have it on his list.

DT
mkanet
Active Participant
Active Participant
 
Posts: 98
Joined: Mon Jan 29, 2007 2:16 pm


Return to V6 Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests