[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 » 07 Dec 2008, 18:29

dude wrote:One more thing, can I leave the UnrarOk="" like it is?
I didn't have this in my previous script and don't know what to do with it.
the unrar status was not collected in the original script that's why UnrarOk didn't exist.

leave it empty, it's the init status (not run), UnrarOk=""

dude

Re: [DONE] Download history ?

Post by dude » 07 Dec 2008, 21:27

Thx for helping.

To make things more clear,
I'm running nzbget on a CH3SNAS.
This device is running embedded linux, "Linux version 2.6.12.6-arm1 (root@CasperFedora) (gcc version 3.3.3) #41 Fri Apr 18 16:47:44 CST 2008".
If I type bash on the command prompt nothing happens. :cry:
I guess you need this to make things work?

I hope you've got another way.

The second command:

Code: Select all

root@CH3SNAS:/mnt/HD_a2/ffp/etc# ./postprocess_log.sh /mnt/HD_a2/usenet/download/ /mnt/HD_a2/usenet/nzb/test.nzb "" 2 1 0
gives me:
sed: bad option in substitution expression
[INFO] Unpack: post-process script started
[[: missing ]]
[[: missing ]]
[INFO] Unpack: - deleting par2-files
[[: missing ]]
[INFO] Unpack: - cleaning up

The first command I didn't try because I have no PAR set available.
Of course this can be done if you need this info.

The command which I run gave one entry in the log file:
1228684460 2 -1

Is there any hope to get this run on a CH3SNAS?

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

Re: [DONE] Download history ?

Post by hugbug » 07 Dec 2008, 23:59

The versions of sed, awk, etc. included in busybox have limited functionality.

dude

Re: [DONE] Download history ?

Post by dude » 08 Dec 2008, 08:10

So we're lost? :(
Or can we make (simplified) script to work with busybox?

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

Re: [DONE] Download history ?

Post by dvbm » 08 Dec 2008, 10:08

well this is simple my script won't run on your busybox so you can't use it

post you script on pastebin i'll check it out and add a line for the history log, you probably won't have all the entries i have on my script but a tleast one entry per download with or without unrar status..

dude

Re: [DONE] Download history ?

Post by dude » 08 Dec 2008, 10:41

Great!

Right now I'm @ work but will put my postprocess.sh on pastebin this evening.
(And give the url here.)
Your script now gives an empty name field.
Date,parcheck and unrar fields seem to be working fine. :)

date: works
name: always empty
parcheck: works
unrar: works

dude

Re: [DONE] Download history ?

Post by dude » 08 Dec 2008, 22:38

Here we go!

I guess the missing name is most important to know, otherwise all other info is useless.
I hope this can be fixed.

Thx.

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

Re: [DONE] Download history ?

Post by dvbm » 08 Dec 2008, 23:43

that's my script please post the script you were using before so i can add a line to it for the history log

dude

Re: [DONE] Download history ?

Post by dude » 09 Dec 2008, 19:44

Hmmm, I guess it was late that time. :?

Here it is.

To be honest with you I don't like my script, it sometimes delete rar files and sometimes not.
I even have seen it downloaded 4Gig, checked, unpacked and then deleted everything! :shock:

Your script seems to be more robust.
Although it doesn't delete rar files for cleanup.
Maybe this is because of the script errors.

Little of topic but can you put also your script without history stuff on pastebin?
This way I can test a little bit more.

If it's not possible to put the name field in history I guess it's better not to use it.
Because this is vital information.

Thx!

dude

Re: [DONE] Download history ?

Post by dude » 09 Dec 2008, 21:33

sed seems to be the problem so I typed sed on my NAS.
Maybe the output can help?

root@CH3SNAS:~# sed
BusyBox v1.12.1 (2008-09-29 20:38:04 CEST) multi-call binary

Usage: sed [-efinr] pattern [files...]

Options:
-e script Add the script to the commands to be executed
-f scriptfile Add scriptfile contents to the
commands to be executed
-i Edit files in-place
-n Suppress automatic printing of pattern space
-r Use extended regular expression syntax

If no -e or -f is given, the first non-option argument is taken as the sed
script to interpret. All remaining arguments are names of input files; if no
input files are specified, then the standard input is read. Source files
will not be modified unless -i option is given.

root@CH3SNAS:~#

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests