RPC api listfiles

Get help, report and discuss bugs.
Post Reply
douglasf
Posts: 5
Joined: 05 Jul 2013, 12:37

RPC api listfiles

Post by douglasf » 31 Jul 2013, 08:45

I was trying out listfiles and wanted to use the (0, 0, x) alternative for the arguments. But I cannot grasp how I should get the NZBID to start with? Naturally I felt like append should return an NZBID instead of "true" and 0 or -1 instead of "false". Have I missed something here? :)

If not I want to suggest the change mentioned above!

Thanks!

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

Re: RPC api listfiles

Post by hugbug » 31 Jul 2013, 09:05

Append() puts file into NzbDir and then perform scanning of NzbDir. Append() returns "true" if no error happen. "True" doesn't mean that the file was added to queue :shock:. If user has NzbProcess-script (option NzbProcess), the nzb-file could be ignored. The transferred file could be an archive, which NzbProcess-script could have extracted resulted in multiple files (most likely with different names) added to queue.

If you add a simple nzb-file (not archive) you should use listgroups() to find (via name) the added nzb in queue. Groups have NZBID which you can use in listfiles().

Why you need the NZBID of added file?

douglasf
Posts: 5
Joined: 05 Jul 2013, 12:37

Re: RPC api listfiles

Post by douglasf » 31 Jul 2013, 09:32

Ohh i see. I'll experiment some with listgroups then :)

I want it to poll for download complete of a specific download. Is there any other way?

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

Re: RPC api listfiles

Post by hugbug » 31 Jul 2013, 09:43

Completed downloads disappear from listgroups() and appear in history(). Once you know NZBID you can identify it in history() as well.

Or you can identify it via NZBFilename which you have used in Append() - this is for both listgroups() and history().

douglasf
Posts: 5
Joined: 05 Jul 2013, 12:37

Re: RPC api listfiles

Post by douglasf » 31 Jul 2013, 09:57

Yes I figured it out! Thanks for the fast responds.

Post Reply

Who is online

Users browsing this forum: No registered users and 55 guests