Feature Request: Change destination per NZB group

Get help, report and discuss bugs.
KaraokeStu
Posts: 39
Joined: 17 Sep 2008, 20:01

Feature Request: Change destination per NZB group

Post by KaraokeStu » 10 Nov 2008, 03:22

Hi,

I know we can currently change the destination of files etc using categories.

I was wondering if it would be possible to alter the destination for a group of NZBs

For example, if I miss a few episodes of Dr. Who, I would set say episodes 1-4 to download.
Under the current system, the post-process scripts will extract them all and then try to move them.

What I'd like is to extract them, but then move them based on what I tell NZBGet the destination should be (if I tell it) or what the script thinks if I do not set a path.

Is this possible?

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Feature Request: Change destination per NZB group

Post by hugbug » 12 Nov 2008, 10:21

This requires modifications in nzbget-server and nzbgetweb. The postprocess-script should be also extended to support that.

I was thinking of more general feature, which I would call "postprocess parameters".
We define a number of postprocess parameters. How they will be used will depend solely on postprocess-script.

I can imagine following usage for pp-parameters:
  • Define the output-directory (your request);
  • Tell the script if unpack files or not;
  • Specify password for protected rar files.
  • etc.
Requirements:
  1. Each nzb-file (group in terms of nzbget) can have a number of postprocess parameters assotiated with it;
  2. Each pp-parameter is a string with unlimited length;
  3. The pp-parameters can be changed with new edit-subcommand (for console usage) or RPC-command (for usage from web-interface);
  4. Web-interface must be extended with ability to show and edit pp-parameters.
We need to decide:
  1. If we need a fixed number of pp-parameters (say 5 or 10) or unlimited. As alternative - fixed number, but not hardcoded, instead configurable via nzbget.conf;
  2. How to pass pp-parameters to pp-script: as additional command line arguments, via special text-file, as environment variables.

dalrun
Posts: 170
Joined: 09 Sep 2008, 17:12
Contact:

Re: Feature Request: Change destination per NZB group

Post by dalrun » 12 Nov 2008, 23:30

hugbug wrote:I can imagine following usage for pp-parameters:
Define the output-directory (your request);
Tell the script if unpack files or not;
Specify password for protected rar files.
I don't get it, why would NZBGet get involved with PostProcess script functions and configuration? The destination directory is defined by NZBGet and PostProcess script variables, what options are missing and where are they missing (NZBGet or the script)? If you don't want PostProcess to extract files, what do you want it to do and when? Wouldn't that be a PostProcess function and shouldn't the script already know when to use that function? I haven't thought of password protected archives (won't touch them myself) but I'd think it'd be easier for PostProcess to deal with those directly, e.g. look for a password file.

...Having PostProcess script variables editable via NZBGet shell or web interface is an interesting idea, but I don't see how or why NZBGet would get involved in passing them.
KaraokeStu wrote:I was wondering if it would be possible to alter the destination for a group of NZBs


How are the Dr Who episodes unique, where do they end up now and where do you want them to end up?

KaraokeStu
Posts: 39
Joined: 17 Sep 2008, 20:01

Re: Feature Request: Change destination per NZB group

Post by KaraokeStu » 12 Nov 2008, 23:40

It is not just Dr Who, but any episodes.

The files at the moment are downloaded in a ZIP file containing multiple NZB files

eg: Dr Who.nzb.zip

This then extracts to the following:

Dr Who S01E01.nzb
Dr Who S01E02.nzb
.....
Dr Who S01E12.nzb

These are all in the Video/TV category.

The post-process script then outputs them all to /mnt/disk1/share/Video/TV/[nzb file name]

What I want to do is actually have them all moved to /mnt/disk1/share/Video/TV/Dr Who

Does this make more sense?

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Feature Request: Change destination per NZB group

Post by hugbug » 13 Nov 2008, 10:33

dalrun wrote:I don't get it, why would NZBGet get involved with PostProcess script functions and configuration? The destination directory is defined by NZBGet and PostProcess script variables, what options are missing and where are they missing (NZBGet or the script)? If you don't want PostProcess to extract files, what do you want it to do and when? Wouldn't that be a PostProcess function and shouldn't the script already know when to use that function? I haven't thought of password protected archives (won't touch them myself) but I'd think it'd be easier for PostProcess to deal with those directly, e.g. look for a password file.
The general configuration (common destination directory, etc.) is made via pp-script config. That's OK, pp-parameters are not intended to replace that configuration.

With pp-parameters it's possible to provide pp-script with information on how to process each individual nzb-file, if a special processing is requested by user. For example, KaraokeStu want to specify a different destination directory for a specific nzb-file. Other users may want to disable unpacking for individual nzb-files in queue. Since pp-script is called for each nzb-file, an additional pp-parameter could tell the script to skip processing for an nzb-file.

To make that feature comfortably usable nzbgetweb should be configurable with definitions of pp-parameters (parameters supported by a specific pp-script): their names and/or descriptions (for web-interface), possibly their types (simple string, combobox with specific values like "yes", "no", etc.).

doctorvangogh
Posts: 21
Joined: 29 Oct 2008, 01:03
Location: Germany (NRW)

Re: Feature Request: Change destination per NZB group

Post by doctorvangogh » 13 Nov 2008, 14:36

KaraokeStu wrote: These are all in the Video/TV category.

The post-process script then outputs them all to /mnt/disk1/share/Video/TV/[nzb file name]

What I want to do is actually have them all moved to /mnt/disk1/share/Video/TV/Dr Who

Does this make more sense?
Yes it does, but *not* for nzbget.

The current beta version of the unpak.sh postprocessing script already offers auto categorization of tv shows, no matter from how many or few nzb files they come.

/yourpath/tv/<seriesname>/season <x>/<someepisode>.avi|mkv

Why not just ust that before reinventing the wheel? ;)

dalrun
Posts: 170
Joined: 09 Sep 2008, 17:12
Contact:

Re: Feature Request: Change destination per NZB group

Post by dalrun » 14 Nov 2008, 00:35

hugbug wrote:combobox with specific values like "yes", "no"
Wouldn't those be better attached to NzbProcess? Upload form switches and file-name flags are the easiest ways I can think of for giving special treatment to a single nzb. This gives me an excuse to complain about special character replacement by NZBGet. It would be nice if the AppendNzbDir name always matched the nzb-file base-name. The underscore replacement has bothered me before, but now its putting a crimp in file-name flags (need a special character to define the flag portion).

KaraokeStu's issue seems more like a script side category options/configuration issue, e.g. weather or not to create nzb-name sub-directories for a specific category (with PPweb, Video/TV/Dr Who would be the category if that's where he uploaded the nzb).
doctorvangogh wrote:/yourpath/tv/<seriesname>/season <x>/<someepisode>.avi|mkv
Interesting. Is that configurable, e.g. TV/Series/episode.ext or TV/episode.ext or Video/episode.ext?

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Feature Request: Change destination per NZB group

Post by hugbug » 14 Nov 2008, 17:16

dalrun wrote:Wouldn't those be better attached to NzbProcess?
Upload form switches and file-name flags are the easiest ways I can think of for giving special treatment to a single nzb.
Rename files using special rules? That's indeed the easiest way, but it's not very friendly and you cannot change the parameters after the file was added to queue. Actually that technique can be allready used without any changes in nzbget or nzbgetweb.

But don't you like the idea of more comfortable feature as I descibed in the second post?
dalrun wrote:This gives me an excuse to complain about special character replacement by NZBGet. It would be nice if the AppendNzbDir name always matched the nzb-file base-name.
It matches already. Only few characters (":*?\"><'\n\r\t), that make troubles on windows are replaced. It's necessary even for servers running on linux, because they can share downloads for windows-computers. That's what most optware-users do.

doctorvangogh
Posts: 21
Joined: 29 Oct 2008, 01:03
Location: Germany (NRW)

Re: Feature Request: Change destination per NZB group

Post by doctorvangogh » 14 Nov 2008, 17:49

dalrun wrote: Interesting. Is that configurable, e.g. TV/Series/episode.ext or TV/episode.ext or Video/episode.ext?
Not yet - the tv episode categorization seems to be new in the beta versions of ydrol's unpak.sh script (take a look at the last lines of the AUTO_CATEGORY_FROM_FILENAMES_SERIES function). The lastest published version seems to be from the beginning of october. I had to make two minor modifications to get the feature to run on my regular linux box.

I have to say I really like the auto categorization feature, I even have some ideas on expanding it: Get tv episode titles and rename a file accordingly once you know series name, season & episode number.

Code: Select all

$series="Series name with all dot and space characters replaced by '+'"
wget -U "" "http://www.google.com/search?q=allintitle%3a+%22$seriesname%22+%22episode+list%22+site%3aimdb.com&btnI=745"      # &btnI=745 triggers I'm feeling lucky button

Now egrep (or sed) that with
"<h3>.*Season.*([[:digit:]]{1,2}).*Episode.*([[:digit:]]{1,2}).*<a.*>(\w+)</a>.*</h3> "

and \1,\2,\3 will have your season number, episode number and episode title - just have to lookup the downloaded title now
Anyone care to implement that? ;)

---------
hugbug wrote: But don't you like the idea of more comfortable feature as I descibed in the second post?
Adding additional (optional) parameters per collection is a great idea. They could be used by postprocessing scripts to modify certain actions on the target (extract/don't extract/only extract X, categorize to A/B/C).
But trying to solve some categorization properties (possibly automated) from within nzbget (which I understand primarily as a download client), doesn't seem like the right way to do it.
You'd have to implement a ton of logic in nzbget itself, which might not produce a result that everybody likes as implemented. And since there's already the postprocessing script option available, which are easy to reconfigure or even modify, I'd really not go to all that trouble.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Feature Request: Change destination per NZB group

Post by hugbug » 14 Nov 2008, 18:10

doctorvangogh wrote: Adding additional (optional) parameters per collection is a great idea. They could be used by postprocessing scripts to modify certain actions on the target (extract/don't extract/only extract X, categorize to A/B/C).
But trying to solve some categorization properties (possibly automated) from within nzbget (which I understand primarily as a download client), doesn't seem like the right way to do it.
You'd have to implement a ton of logic in nzbget itself, which might not produce a result that everybody likes as implemented. And since there's already the postprocessing script option available, which are easy to reconfigure or even modify, I'd really not go to all that trouble.
No, nzbget will not bother with understanding of pp-parameters. Nzbget/nzbgetweb will only provide a way for users to define parameter values. The values will be passed to pp-script after the download is completed. It's totally up to pp-script how to deal with pp-parameters.

Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests