[Request] Set Filename & unrar password via API

Discuss newly added features or request new features.
Post Reply
Hooray
Posts: 2
Joined: 12 May 2014, 13:32

[Request] Set Filename & unrar password via API

Post by Hooray » 12 May 2014, 13:39

Hello

is it possible, to extend the api, so that the "append" method can get more params?
The most important in my use case is setting filename and unrar password.

They must be optional.

As second step, these new fields should be included in the "add file" dialog.

byebye
Hooray

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

Re: [Request] Set Filename & unrar password via API

Post by hugbug » 12 May 2014, 17:32

Filename is already in params. Password belongs to collection of post-processing parameters. Passing collection of objects via API is something that current API parser is not able to process. The password still can be relatively easy set via a separate API call after adding of nzb-file.

As for add dialog the problem here isn't the missing of params in append method but rather the difficulties in designing UI considering the fact that the add dialog can upload multiple files.

Hooray
Posts: 2
Joined: 12 May 2014, 13:32

Re: [Request] Set Filename & unrar password via API

Post by Hooray » 13 May 2014, 05:38

Good morning

can you point to an example how to
1) find the object i just did add via "append"
2) set the password
?

thx ;)

Lieben gruss nach NRW :D

Hooray

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

Re: [Request] Set Filename & unrar password via API

Post by hugbug » 15 May 2014, 09:20

To set password use method editqueue with command GroupSetParameter:

Code: Select all

NzbgetServerObject.editqueue("GroupSetParameter", 0, "*Unpack:Password=yourpassword", 123)
Replace "yourpassword" with actual password and 123 with ID of NZB-file (NZBID).

How to get the ID? You would need to use method listgroups and identify your file by name (field NZBFilename), then take field NZBID.

prinz2311
Posts: 466
Joined: 08 Dec 2012, 00:03

Re: [Request] Set Filename & unrar password via API

Post by prinz2311 » 15 May 2014, 09:45

Alternatively: The NZB-Spec allow you to add the password to the nzb content itself. Maybe it's easier for you to add the password to the Nzb (data) you send to NZBGet.

NZB-Specs:
http://wiki.sabnzbd.org/nzb-specs

In the <head> section of the NZBFile add:

Code: Select all

<meta type="password">secret</meta>

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests