sabnzbd / sabnzbd

SABnzbd - The automated Usenet download tool

Home Page:http://sabnzbd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API: how to get incomplete directory of download? Not in queue, not in get_files

sanderjo opened this issue · comments

Description

Of stuff in the Queue, I want to know the incomplete directory.
AFAIK it's not in mode=queue and not in mode=get_files and not somewhere else? So can we get that?

Workaround could be scanning the incomplete for a matching directory name, but that does not work in case of overlapping download name

image

image

image

Nothing in get_files:

image

The info is in sabnzbd.log's debug, but parsing that is not no wish:

$ cat .sabnzbd/logs/sabnzbd.log | grep -e dof -e _xk | cut -c83- | sort -u
Saving data for SABnzbd_nzo_bpezs_xk in /home/sander/Downloads/incomplete/MyBigDownload.1/__ADMIN__
Saving data for SABnzbd_nzo_f4_0_dof in /home/sander/Downloads/incomplete/MyBigDownload/__ADMIN__

Why would anyone need access to the internal folder we use during downloading?
That's why it's not in the output, so nobody messes with our data.

Ah, good question! Let me explain:

At this moment, I have a post-processing script that checks the download for certain criteria. So only after the download, I can see if it is what I wanted.

I want to introduce a check during download: as soon as the first rar or first 10% is in, I want to run that check script. Note: the criteria are already visible in the first rar. Just like we now do checks for password-protected and unwanted-extensions.
If the script says "no, does not contain what you want", then I want to lower the prio or pause the download.

Ultimately, an "interemediate script" feature in SAbnzbd itself would be nicest, but I wanted to start with my own external script running each 10 second. So as a PoC so that can verify the working.

so nobody messes with our data.

Fair point. Using matching of queue output and incomplete directory should be enough for the PoC and most real life stuff.

Indeed we don't have that. Probably nzbget has that.. They have a script for everything 🤗