[DONE] Download history ?

Get help, report and discuss bugs.
dvbm
Posts: 53
Joined: 28 Nov 2008, 09:22

Re: [DONE] Download history ?

Post by dvbm » 11 Dec 2008, 17:18

you're right the postprocess script could also log the total data size after processing.
i'll do some tests tonight and update the status.php to display that info

dude

Re: [DONE] Download history ?

Post by dude » 11 Dec 2008, 20:52

Oops, script gives some problems now, take a look here for nzbget.log.

I guess this will trigger you:
Thu Dec 11 21:44:51 2008 DETAIL Post-Process: /mnt/HD_a2/ffp/etc/postprocess2_log.sh: line 99: syntax error: "(" unexpected

dude

Re: [DONE] Download history ?

Post by dude » 11 Dec 2008, 21:03

Also, when ProcessCols=0, same error message. :shock:
Thu Dec 11 21:59:12 2008 DETAIL Post-Process: /mnt/HD_a2/ffp/etc/postprocess2_log.sh: line 99: syntax error: "(" unexpected
nzbget.log

dvbm
Posts: 53
Joined: 28 Nov 2008, 09:22

Re: [DONE] Download history ?

Post by dvbm » 12 Dec 2008, 09:50

i'm, sorry that error doesn't show me what's wrong make sure you have properly copied/pasted the script on your machine and run both command i posted in a previous post againt the sh script, not inside nzbget and see what it does.

or even better try to run the script alone ./script.sh and report errors and to make sure you've not screwed the copy/paste go see what's on the line number indidacted in your copy of the script and report the line..

i test my versions against my debian busybox now which is supposed to be a lot older than what you have on your system so aside differences in other commands it should work on your busybox too without syntax errors..

do not test the script in nzbget right away if it doesn't work on the shell it's no use running it in nzbget, just test the script you've copied with the two commands i posted earlier making sure you have one working rar for one of the two commands, read my comments on that rar in the same post..

here's the post with the commands to execute, don't forget to also do a test with a properly name rar as explained there : https://apps.sourceforge.net/phpbb/nzbg ... rt=10#p389

dude

Re: [DONE] Download history ?

Post by dude » 12 Dec 2008, 19:08

Don't be sorry you'r doing a great job.
It was probably me screwing things up. ;)

nzbget terribly crashed last evening and also maybe a copy/paste mistake.
After rebooting the NAS I started again.

I tested like you suggested by running the script on the command line. (Why didn't I think of that. :roll: )
It looks very promising!

Only weird thing happend when I put ProcessCols=0

Code: Select all

root@CH3SNAS:/mnt/HD_a2/usenet/download/test# ./postprocess_lognew.sh /mnt/HD_a2/usenet/download/test/ /mnt/HD_a2/usenet/nzb/test.nzb /mnt/HD_a2/usenet/download/test/HomebreWare-Vers.3.4-Pro-2008.par2 2 0 0
[INFO] Unpack: test post-process script started
[INFO] Unpack: Not the last collection in nzb-file, exiting
root@CH3SNAS:/mnt/HD_a2/usenet/download/test#
I have no clue why it is telling me "[INFO] Unpack: Not the last collection in nzb-file, exiting" and all stops working. :!: :?:

The other command worked fine with no errors, no matter if ProcessCols=0 or 1.

Code: Select all

./postprocess_lognew.sh /mnt/HD_a2/usenet/download/test/ /mnt/HD_a2/usenet/nzb/test.nzb "" 2 1 0

dude

Re: [DONE] Download history ?

Post by dude » 12 Dec 2008, 21:31

Well, did some more testing, not on the command line but a complete run with nzbget.
Forget my post above this one, all runs perfectly. :D

I guess we're done here.
Only nice extra would be the amount of data downloaded.
On my NAS the command:

Code: Select all

du -d 0 -h
shows exactly what I want to know.
Total size of the current directory in human readable numbers. ;)
If it's possible to do this when the rar/par set is still there, it shows you the amount of bytes downloaded. 8-)

dude

Re: [DONE] Download history ?

Post by dude » 12 Dec 2008, 21:36

Code: Select all

root@CH3SNAS:/mnt/HD_a2/usenet/download# du -d 0 -h
111.3G  .
root@CH3SNAS:/mnt/HD_a2/usenet/download#
:o :lol:

dvbm
Posts: 53
Joined: 28 Nov 2008, 09:22

Re: [DONE] Download history ?

Post by dvbm » 14 Dec 2008, 10:05

dude wrote:On my NAS the command:

Code: Select all

du -d 0 -h
shows exactly what I want to know.
i don't have -d on my du, tell me if that command works on your nas :

Code: Select all

du -h -s -0 . | cut -f1
dude wrote:If it's possible to do this when the rar/par set is still there, it shows you the amount of bytes downloaded. 8-)
i think it's better to give the total size of the download after post processing so you know how much place it takes on the HD, i will also add the size per collection.

And about your previous comments, make sure you understand what ProcessCols is used for.
Do a test on the same nzb with 0 or 1 to see the difference.

i'll post back here when i've updated the script with the download size info

dude

Re: [DONE] Download history ?

Post by dude » 14 Dec 2008, 12:08

Code: Select all

root@CH3SNAS:~# du -h -s -0 . | cut -f1
du: invalid option -- 0
BusyBox v1.12.1 (2008-09-29 20:38:04 CEST) multi-call binary

Usage: du [-aHLdclsxhmk] [FILE]...

Summarize disk space used for each FILE and/or directory.
Disk space is printed in units of 1024 bytes.

Options:
        -a      Show file sizes too
        -H      Follow symlinks on command line
        -L      Follow all symlinks
        -d N    Limit output to directories (and files with -a) of depth < N
        -c      Show grand total
        -l      Count sizes many times if hard linked
        -s      Display only a total for each argument
        -x      Skip directories on different filesystems
        -h      Sizes in human readable format (e.g., 1K 243M 2G )
        -m      Sizes in megabytes
        -k      Sizes in kilobytes (default)

root@CH3SNAS:~#
The -d 0 option is very nice because it shows total size of current folder. (depth=0)

I guess some people like to know how much they downloaded (most likely the ones with download limit).
On the other hand it's nice to know how much bytes each nzb is eating on your HDD.
I don't have a download limit, probably most of us, so it's fine by me to show HDD size.
Every downloaded nzb is sitting in it's own folder so it sounds like an easy thing to do?
But if I remember correctly, creating folders for each nzb is an optional setting somewhere.

I did test ProcessCols and what I see that it extracts rar files if they are created after first extraction of the "normal" rar set.
If ProcessCols=0 it leaves newly created rar set(s) alone.
All works as designed. :D

Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests