API-method "append"


int append(string NZBFilename, string NZBContent, string Category,
    int Priority, bool AddToTop, bool AddPaused, string DupeKey,
    int DupeScore, string DupeMode, struct[] PPParameters)

Add nzb-file or URL to download queue.


Return value

Positive number representing NZBID of the queue item. “0” and negative numbers represent error codes. Current version uses only error code “0”, newer versions may use other error codes for detailed information about error.


Read local nzb-file from disk and send it to NZBGet, adding file to download queue:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from xmlrpclib import ServerProxy
>>> server = ServerProxy('http://nzbget:tegbzn6789@localhost:6789/xmlrpc')
>>> filename="C:\\ubuntu-7.10.nzb"
>>> in_file = open(filename, "r")
>>> nzbcontent = in_file.read()
>>> in_file.close()
>>> from base64 import standard_b64encode
>>> nzbcontent64=standard_b64encode(nzbcontent)
>>> server.append(filename, nzbcontent64, 'software', 0, False, False, '', 0, 'SCORE',  [('*unpack:', 'yes'), ('EMail.py:', 'yes')])