[DONE] Download history ?

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

[DONE] Download history ?

Post by dvbm » 28 Nov 2008, 09:35

Hi,

A firend of mine just got a popcorn and pointed me to nzbget we didn't know about.
So i'm currently moving from ninan to nzbget on my linux, i got nzbget-testing working and the web interface too but there a small thing that is missing compared to ninan which i find pretty usefull, it's the download history page, listing on a single page what was the exit status of each uploaded nzb and their parcheck / unrar status (would be unrar postprocess result with nzbget i guess).

After checking a bit and not finding that feature i was wondering if there was a simple way to have such a download history, maybe thru one of the postprocess scripts or do i have to build it ?

My idea was to simply use a plain text file in the MAINDIR and put one line in it for each nzbget group postprocessed, then add a very simple web page in the web interface to display that history file..
Of course nzbget could build hat history file itself but the simple way i to use a postprocess script..

Please let me now if something similar already exists

.dvbm
Last edited by dvbm on 04 Dec 2008, 18:14, edited 1 time in total.

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

Re: Download history ?

Post by hugbug » 28 Nov 2008, 09:58

Postprocess-script is a perfect place to create HTMLed history.
Ydrol's script (unpack.sh) can do this. Discussed in NMT forum and in our forum.

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

Re: Download history ?

Post by dvbm » 28 Nov 2008, 11:17

there seems to be some html log in unpack.sh but i don't really need such an advanced script and i'm not using a nmt either so i guess it'll be quicker for me to do it in my very limited unrar postproc script and add a simple php page on nzbget web interface.

thx for the quick reply

dude

Re: Download history ?

Post by dude » 28 Nov 2008, 18:57

Care for sharing your script dvbm?

I'm also using a the standard postprocess.sh script because it fits my needs.
But what you are telling, a php webpage with history, sounds very usefull.
lighttpd (webserver) with php-cgi is already running on my ch3snas.

Thx!

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

Re: Download history ?

Post by dvbm » 28 Nov 2008, 22:10

haven't had time to work on it yet but when it's done i'll post it here, give a couple of days to test and make something good enough to be shared although don't expect anything spectacular the very simple page that i had in ninan was well enough for me..

dude

Re: Download history ?

Post by dude » 28 Nov 2008, 22:24

no fancy stuff, just functional.
Sounds good to me. 8-)

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

Re: Download history ?

Post by dvbm » 04 Dec 2008, 18:13

i finally had time to make a download history for nzbgetweb-1.3-testing

in settings.php and settings-template.php insert after :

Code: Select all

$FormMethod='post';

Code: Select all

# Download history log file.
# This file should be created by your post process script.
# One Entry by line with the following format : timestamp parcheck unrar nzbfile.
# timestamp=unixtime (seconds since epoch) - parcheck=nzbget parcheck value - unrar=-1(not run),0(success),1(failed) - nzbfile=any download "name" string
$HistoryLog='/path/to/history.log';

# Download history log lines per page.
$HistoryPerPage=50;

# History log display order (asc, desc).
$HistorySort='desc';
code also available here : http://pastebin.com/f3f620766

then use my modified status.php available here : http://pastebin.com/f688adc28

The history log format is very simple and described in the text above, it should be generated by your postprocess script.
Compared to ninan history, one data is missing but isn't passed by nzbget to the postprocess script, which is the download speed of the collection being post-processed.

It would be nice to add that data to the postprocessing scripts in order to improve that history log.

The web page itself uses existing nzbgetweb status.php functions and has a "purge history" link if you web server has proper rights on the history log file.

hope it helps, let me know if you have comments or problems with the script.

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

Re: [DONE] Download history ?

Post by hugbug » 04 Dec 2008, 19:54

Interesting work. Thanks for sharing.
I'll consider using your extension in a next version.

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

Re: [DONE] Download history ?

Post by dvbm » 04 Dec 2008, 22:00

please do, and if you can add some download speed info it would be very nice

also doing my tests i noticed two bugs in the testing version but you probably know about them, first there's a problem when reloading queued nzbs, looks like one of the nzb content got "copied" inside all the other groups in the queue.

And customizing my postprocess.sh script i noticed that when a script ends "very fast", like when adding an "exit" command at the top of the script, then nzbget goes into a loop sending over and over again the same collection info to the postprocess script, and the only way to stop it is to kill the daemon and restart it making sure the script does not exit doing nothing..

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

Re: [DONE] Download history ?

Post by hugbug » 04 Dec 2008, 23:42

dvbm wrote:if you can add some download speed info it would be very nice
nzbget doesn't gather speed info for nzbs. May be I'll add that later, but I actually do not see much usage for that info.
dvbm wrote:first there's a problem when reloading queued nzbs, looks like one of the nzb content got "copied" inside all the other groups in the queue.
I didn't get it. Could you explain the problem in detail (with examples may be)?
dvbm wrote:nzbget goes into a loop sending over and over again the same collection info to the postprocess script
This bug is fixed in the latest version (svn repository). Can you test svn-version?

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests