My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Torrential  

Featured, Torrential
Updated Feb 4, 2010 by pkre...@gmail.com

Introduction

Torrential, Web-interface for enhanced-ctorrent and possibly other command line torrent clients. It's designed to run on embedded systems with appweb such as the NSLU2, but can be potentially installed on any system with php and enhanced-ctorrent (tested with version dnh3.1-9 only). Please leave a comment if you tried it on any other system. I am still working on GPLing the code, so be patient. I am using the config script and some ideas from a early version of Kai-T's torrent interface, however it's a complete rewrite except for the configuration read/write script.

Screenshot

Download

Latest version

Installation

Quick Installation HowTo on NSLU2 with Unslung 6.8:

ipkg update
ipkg install enhanced-ctorrent
ipkg install appweb
/opt/etc/init.d/S81appweb restart
cd /opt/var/appWeb/web/
#get the latest link from this site and download it, example:
curl -O http://oz4projects.googlecode.com/files/torrentialxxxxxxx.zip
unzip torrential*.zip
chown -R nobody.everyone torrential/
mkdir /public/torrent/
chmod 777 /public/torrent/
vi inc_config.php 	#(have a look inside)
# visit: http://nslu-ip:7777/torrential/index.php
# user: giveme	pass: torrent
# click on Help.

History

  • 22.03.2007: Uploaded Zip with Alessandro's fixes. Thanks a lot! (SVN + other fixes coming soon)
  • 21.01.2009: Zip & SVN include all fixes submitted below in the comments! Thanks!
Comment by Alezzan...@gmail.com, Feb 21, 2008

Hi, great job! It works very well on my nslu2 device, but I've experienced some problems using it with lighttpd + php. it Seems to refuse to analyze (maybe some limitations of php) enhanced-ctorrent BIG .stat files, as I can see, enhanced-ctorrent doesn't overwrite the "log"(.stat) file but simply adds new lines to it, increasing the filesize, the result on my webserver is that the dyn_progress.php refuses to load the $(torrent_file).stat, maybe the file is too big (when I've experienced this problem the log file is about 11MB). dyn_stopped.php has the same problem. I found a symply workaround that you can add to your project if you want, simply add this few lines to dyn_progress.php: (it makes on every dyn_progress.php loading a "tail" of current $(torrent_file).stat overwriting every old "tail" maked, with this workaround the filesize will not execeed few KB, so dyn_progress.php/dyn_stopped.php is able to load it)

if( isRunning(substr($file,0,strlen($file)-4)) ){^M
    $filenames=array();
    $filenames[] = substr( $file,0,strlen($file)-3 );
    foreach ($filenames as $val){
      $cmdtail="/usr/bin/tail ". $download_path . $val . "stat > ". $download_path . $val ."stat.tail";
      exec($cmdtail);
    }
    $stats[] = substr( $file,0,strlen($file)-3 ) ."stat.tail";
}

and this line to dyn_stopped.php :

if (substr(strtolower($file), -4)=="stat.tail")

Hope this solution can help someone,

Bye,

Alessandro Arrichiello <alezzandro@gmail.com>.

Comment by Alezzan...@gmail.com, Feb 21, 2008

Who want can download directly patched files (dyn_progress.php and dyn_stopped.php) from here: http://www.alexworld.it/files/torrential-fixedfiles.tar

bye,

Alessandro Arrichiello <alezzandro@gmail.com>.

Comment by Alezzan...@gmail.com, Feb 21, 2008

I've also experienced that on slow device like my 'nslu2' after many hours seeding/downloading with enhanced-ctorrent when the log-file reaches very big size (about 1gb), the 'tail' of the .stat file begin very difficult, so I've thinked another possible workaround completely resetting the .stat file only when .stat file has excedeed a size of 50MB (you can edit it as you want). This will overwrite with no data the current .stat file and will print the current stats for the torrent file.

if( isRunning(substr($file,0,strlen($file)-4)) ){
$filenames=array();
$filenames[] = substr( $file,0,strlen($file)-3 );
foreach ($filenames as $val){
$fsize=exec("ls -s ".$download_path.$val."stat");
$fsize=explode(" ",$fsize);
if ($fsize[0]>52428800){
exec("echo >".$download_path.$val."stat");
sleep(8); // give time to ctorrent to re-populate .stat file
}
$cmdtail="/usr/bin/tail ". $download_path . $val . "stat > ". $download_path . $val ."stat.tail";
exec($cmdtail);
}
$stats[] = substr( $file,0,strlen($file)-3 ) ."stat.tail";
}

the above download link for tar-file is upgraded with new patches, if you don't want them, simply comment them out! :-)

Byebye,

Alessandro Arrichiello <alezzandro@gmail.com>.

Comment by ripper...@gmail.com, Apr 26, 2008

I find that torrential is very slow...it's a problem of mine?

Comment by tsou...@gmail.com, May 25, 2008

I use the server on a moded Maxtor Shared Storage II. It runs fine apart from the fact that once the .stat files get really big (after a few minutes) it slows down considerably apart from the space problem. The clearing facility in the script that deletes the .stat files after they get bigger than some MBs doesn't work, and not even external cron scripts do, since the Torrential scripts open the .stat files in create mode. I changed the create operator ">" to append ">>" in inc_functions.php and now both the internal as well as external clearing scripts ( echo > ${statfile}) work.

Comment by golfh...@gmail.com, Sep 17, 2008

Experienced slowdowns as others have. In looking at the

"if ($fsize0?>52428800){"
it appears that the size is too large, at least it is for me on my nslu2 running unslung. I ran the ls -s manually and I believe it's outputting the file size in kb so if the statement is compared as above, it's 52 gig. It should be something like "if ($fsize0?>52429){"

I'm not experienced in php or linux for that matter, I can just say making this change worked for me, the .stat file resets at 50mb now.

Also, I have included the changes suggested by both Alessandro and tsouap, this is the only thing that I changed that's different. Working fine for me now. Don't know if unslung is reporting size differently than other releases.

Comment by project member pkre...@gmail.com, Jan 21, 2009

Thanks guys - and sorry for being so late. all fixes are in the archive and svn

Comment by ragger.t...@gmail.com, Oct 22, 2009

Hi, i installed everything as told.. i did this 2 times, because i messed a little bit with my slug..

i am wondering becouse all 2 times i get the same problem. i see the torrent, when i click on start, it says "starting torrent" and thats it.. nothing more happens.. the download progress does'nt start.. i have absolutly no clue...

here is the log file:

192.168.1.147 - - Oct 22 22:46:46 2009? "GET /torrential/images/wait.gif HTTP/1.1" 304 229 192.168.1.147 - - Oct 22 22:46:46 2009? "GET /torrential/dyn_process.php?start=Knight&dyn=true HTTP/1.1" 200 567 192.168.1.147 - - Oct 22 22:46:48 2009? "GET /torrential/dyn_progress.php HTTP/1.1" 200 494 192.168.1.147 - - Oct 22 22:46:48 2009? "GET /torrential/dyn_stopped.php HTTP/1.1" 200 1111 192.168.1.147 - - Oct 22 22:46:48 2009? "GET /torrential/images/start.png HTTP/1.1" 304 229

??? deleting and uploading works fine!

can anyone help me?


Sign in to add a comment
Powered by Google Project Hosting