TorrentFlux.com Hey, OppTupacShakur, you have 11 messages, 0 are new.
05-07-2007, 12:42:20
Home Help Search Profile Logout donate chat
News:


+  TorrentFlux Forums
|-+  Code Hacks and Tools
| |-+  TorrentFlux 2.1 Hacks
| | |-+  Category hack
« previous next »
Pages: [1] Go Down Reply Notify of replies Send this topic Print
Author Topic: Category hack  (Read 952 times)
ywwg
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 1



View Profile Personal Message (Offline)
« on: 09-17-2006, 16:44:38 » Reply with quote

this is a basic hack that allows the user to specify a directory where they'd like to save the downloaded torrent.  This means that all the downloads don't get plunked straight into the user folder, but can be arranged by show name, or category, or whatever.

Right now there is no security checking on the category name, so names like "../../../foo" will work.  Also spaces in the category name don't seem to work, and there's no check for that.  But as a hack, it's simple and basic.

here's the diff, which applies to 2.0 as well as 2.1. From your torrentflux folder, run
Code:
cat category.diff | patch -p 4

category.diff
Report to moderator   Logged
Polde
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 3



View Profile Personal Message (Offline)
« Reply #1 on: 02-09-2007, 05:32:33 » Reply with quote

hello all

thx for that great hack!!!!

long time ago i was using Torrent flux but i was forced to go on another client because of this  Sad

now im back  Grin

still missing download/upload limit for all torrents  Huh?
Report to moderator   Logged
deathbarrel
Newbie
*
Offline Offline

Posts: 9



View Profile Personal Message (Offline)
« Reply #2 on: 02-12-2007, 02:30:20 » Reply with quote

hey guys,

recieving the following errors when attempting to run this patch, any clues would be helpful >>

Code:
# cat category.diff | patch -p 4
patching file AliasFile.php
Hunk #1 FAILED at 39.
Hunk #2 FAILED at 69.
Hunk #3 FAILED at 100.
Hunk #4 FAILED at 151.
4 out of 4 hunks FAILED -- saving rejects to file AliasFile.php.rej
patching file functions.php
Hunk #1 FAILED at 2082.
Hunk #2 FAILED at 2437.
Hunk #3 FAILED at 2449.
3 out of 3 hunks FAILED -- saving rejects to file functions.php.rej
patching file index.php
Hunk #1 FAILED at 161.
Hunk #2 FAILED at 201.
Hunk #3 FAILED at 243.
Hunk #4 FAILED at 259.
Hunk #5 FAILED at 276.
Hunk #6 FAILED at 302.
6 out of 6 hunks FAILED -- saving rejects to file index.php.rej
patching file startpop.php
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 227.
2 out of 2 hunks FAILED -- saving rejects to file startpop.php.rej
patching file TF_BitTornado/btphptornado.py
Report to moderator   Logged

Distro: Fedora 4
TF Version: 2.1 final
Python 2.4.1
PHP 5.0.4
Apache 2.0.54
gm
Newbie
*
Offline Offline

TF Base: Linux 1.x
Posts: 3



View Profile Personal Message (Offline)
« Reply #3 on: 03-19-2007, 15:49:23 » Reply with quote

hey guys,

recieving the following errors when attempting to run this patch, any clues would be helpful >>

Code:
# cat category.diff | patch -p 4
patching file AliasFile.php
Hunk #1 FAILED at 39.
Hunk #2 FAILED at 69.
Hunk #3 FAILED at 100.
Hunk #4 FAILED at 151.
4 out of 4 hunks FAILED -- saving rejects to file AliasFile.php.rej
patching file functions.php
Hunk #1 FAILED at 2082.
Hunk #2 FAILED at 2437.
Hunk #3 FAILED at 2449.
3 out of 3 hunks FAILED -- saving rejects to file functions.php.rej
patching file index.php
Hunk #1 FAILED at 161.
Hunk #2 FAILED at 201.
Hunk #3 FAILED at 243.
Hunk #4 FAILED at 259.
Hunk #5 FAILED at 276.
Hunk #6 FAILED at 302.
6 out of 6 hunks FAILED -- saving rejects to file index.php.rej
patching file startpop.php
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 227.
2 out of 2 hunks FAILED -- saving rejects to file startpop.php.rej
patching file TF_BitTornado/btphptornado.py


ME TOO. I'm getting the same problem. ne1 know what the problem is?
Report to moderator   Logged
morsub4u
Newbie
*
Offline Offline

Posts: 40

morsub4u



View Profile Personal Message (Offline)
« Reply #4 on: 03-21-2007, 14:49:38 » Reply with quote

There is a similar hack that I have confirmed works for TF2.3.  Read the thread here:

http://www.torrentflux.com/forum/index.php/topic,1060.0.html

You have to know a little about the code that you are modifying.  Most of the line numbers have changed from what the thread was originally written for, but it works after a bit of simple modification.

Check it out, and post any issues you may have with that hack in there.  It's a good alternative to using this diff file (which wasn't meant for TF2.3 or anything other than the original TF2.1).

Good luck! TF Love
Report to moderator   Logged

Linux distrobution - Mandrake 10.2 (3.4.3-3mdk)
TorrentFlux version - 2.3
Python version - 2.4
PHP Version - 4.3.10
BitTornado Version - 0.3.13
Webserver software and version - Apache 2.0
Pages: [1] Go Up Reply Notify of replies Send this topic Print 
« previous next »
Jump to:  


Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP