xbenjii / torrentexpander

Automatically exported from code.google.com/p/torrentexpander
0 stars 0 forks source link

remove_torrent_from_client do not work #78

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
My config:

remove_torrent_from_client="yes"
torrent_daemon_login="Leonard"
torrent_daemon_password="password"
torrent_daemon_port=""
torrent_daemon_bin="/usr/bin/xmlrpc"

Torrents are not removed from rTorrent.
I have installed xmlrpc in this way:

{{{
svn co https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced/ xmlrpc-c
cd xmlrpc-c 
./configure --disable-cplusplus 
make 
make install
}}}

This package of xmlrpc do not contain any xmlrpc binary, i have installed it by 
apt-get install libxmlrpc-c3-dev.

Original issue reported on code.google.com by login...@gmail.com on 23 Dec 2012 at 10:16

GoogleCodeExporter commented 8 years ago
I'm sorry, I can't test rtorrent on my setup
I'll need you to send me the correct rtorrent removal command and I'll make the 
changes in torrentexpander
Thanks

Original comment by addicted...@gmail.com on 23 Dec 2012 at 10:54

GoogleCodeExporter commented 8 years ago
Email sent

Original comment by login...@gmail.com on 24 Dec 2012 at 12:11

GoogleCodeExporter commented 8 years ago
I'll try to take care of this by the end of the week
Thanks

Original comment by addicted...@gmail.com on 24 Dec 2012 at 5:28

GoogleCodeExporter commented 8 years ago
Please give SVN build 191 a try

Thanks for your input

Addictedtoscreens

Original comment by addicted...@gmail.com on 30 Dec 2012 at 8:20

GoogleCodeExporter commented 8 years ago
Strange..
The torrent remains, but the downloaded file is removed.

Original comment by login...@gmail.com on 30 Dec 2012 at 11:36

GoogleCodeExporter commented 8 years ago
I think you are using an old syntax.
xmlrpc localhost system.listMethods
Look this.

WRONG:
xmlrpc localhost download_list main 
GOOD:
xmlrpc localhost download_list

Original comment by login...@gmail.com on 30 Dec 2012 at 11:50

GoogleCodeExporter commented 8 years ago
Hi

Using download_list instead of download_list main is one of the changes I made 
in SVN build 191
Are you sure you're using the latest build ?

Regarding your comment #5, I'm using d.close then d.erase. Is there another 
command I should use ?

Addictedtoscreend

Original comment by addicted...@gmail.com on 30 Dec 2012 at 12:18

GoogleCodeExporter commented 8 years ago
Yes, sorry, the command is right, but the problem is present.

Original comment by login...@gmail.com on 30 Dec 2012 at 12:55

GoogleCodeExporter commented 8 years ago
Hi

I may have an idea
Can you try replacing the "&&" by "&& sleep 5 &&" on lines 912 and 914 ?

Maybe rtorrent doesn't have enough time to stop the torrent before removing it

I'll let you tinker with this. I'm pretty sure we're close to the solution

Addictedtoscreens

Original comment by addicted...@gmail.com on 30 Dec 2012 at 1:19

GoogleCodeExporter commented 8 years ago
It don't work

Original comment by login...@gmail.com on 30 Dec 2012 at 5:28

GoogleCodeExporter commented 8 years ago
Hi

I'm really sorry, but I have no idea on how to solve this.
Unless the commands used in the script are wrong, there is nothing I can do.

Is it possible that this is an issue with your version of rtorrent ?
Please let me know if you find a solution.

Addictedtoscreens

Original comment by addicted...@gmail.com on 30 Dec 2012 at 7:05

GoogleCodeExporter commented 8 years ago
Tested the code from 885 line to 917 and it works very well.
The problem must be the $torrent_name variable. In my tests i have set manually 
the variable and all went fine.

Original comment by login...@gmail.com on 30 Dec 2012 at 9:07

GoogleCodeExporter commented 8 years ago
Hi

This might explain everything
Only problem is : the $torrent_name variable is set in lines 543 to 550 and 
those lines seem correct.
Could it be a permission issue ? When triggered by rtorrent, does 
torrentexpander have execute privileges on /usr/bin/xmlrpc ?

Thanks 

Original comment by addicted...@gmail.com on 31 Dec 2012 at 6:51

GoogleCodeExporter commented 8 years ago
When rTorrent run torrentexpander i see in process manager the command xmlrpc 
(...) download_list. The program seems to be stuck doing this. 

Original comment by login...@gmail.com on 31 Dec 2012 at 9:56

GoogleCodeExporter commented 8 years ago
Hi

As of now, I have two theories :
1/ This is a permission issue
2/ There is no STDOUT and the command is stuck

A way to test theory #2 vould be to replace :
Line 888 : 'download_list' by 'download_list > /dev/null 2>&1'
Line 891 : 'download_list' by 'download_list > /dev/null 2>&1'
Line 897 : 'd.get_name "$id"' by 'd.get_name "$id" > /dev/null 2>&1'
Line 900 : 'd.get_name "$id"' by 'd.get_name "$id" > /dev/null 2>&1'

Original comment by addicted...@gmail.com on 31 Dec 2012 at 4:01

GoogleCodeExporter commented 8 years ago
No changes.
I have seen that bug does not affects a single file in a torrent, only 
directory have this bug.

Original comment by login...@gmail.com on 1 Jan 2013 at 12:53

GoogleCodeExporter commented 8 years ago
Great job
Now we know what to look for
The issue is situated in lines 543 to 550 ; or rather the way rtorrent passes 
its variables to torrentexpander.
Can you add a few lines in order to write down the content of these variables 
in a text file :
$TR_TORRENT_NAME
$TR_TORRENT_DIR
$torrent
$torrent_name
$current_folder
$folder_short

These lines have to be added before line 543, before line 547 AND before line 
560.

The script must be run once with a torrent that can be deleted and another time 
with a torrent that cannot be deleted.

Once we have that, we will compare these variables against the actual name of 
the torrent.

Thanks

Original comment by addicted...@gmail.com on 1 Jan 2013 at 2:05