JohnDoee / autotorrent

Matches torrents with files and gets them seeded
MIT License
269 stars 34 forks source link

Torrents added to rtorrent being set to Paused #31

Open joshoram80 opened 5 years ago

joshoram80 commented 5 years ago

I have your script setup and it seems to work perfectly other than the fact that torrents added to rtorrent always get set to Paused after a few seconds of seeding. Config is below.

[general]
db = _autotorrent.db
ignore_files =
store_path = store_paths/seeds/
add_limit_size = 64000000
add_limit_percent = 1
link_type = soft
scan_mode = unsplitable,normal

[disks]
disk1 = /media/dmm/spicywiener/private/rtorrent/data/TV
disk2 = /media/dmm/spicywiener/private/rtorrent/data/Movies
disk3 = ~/pip/bin/store_paths/seeds/

[client]
url = scgi:///media/dmm/spicywiener/private/rtorrent/.socket
client = rtorrent
label = autotorrent
ordinarygulp commented 5 years ago

Sounds more like an rtorrent configuration. Do you have the setting enabled, that adds torrents paused?

joshoram80 commented 5 years ago

Nope. The torrents are Started when they are added and seed for a while before pausing. I can restart seeding and they go again for 10-15 seconds and Pause again.

Only torrents added using Autotorrent do this. I have Radarr and Medusa setup and they work fine.

JohnDoee commented 5 years ago

Is autotorrent running as the same user as rtorrent?

The pause stuff is how rtorrent can behave when it does not have write access to the files if it expects to download e.g. a missing NFO.

joshoram80 commented 5 years ago

Apparently it is. ps aux shows my username as running rtorrent, and autotorrent is run from a venv in my home folder, owner is set to me as well. I'm not sure how else to check but it seems ok. It does actually seed but only for 15 seconds then pauses. The files are 100% identical so it shouldn't be downloaded anything missing.

JohnDoee commented 5 years ago

Can you check the links in store_paths/seeds/ actually points to the correct files? The config option disk3 = ~/pip/bin/store_paths/seeds/ might confuse it as it could create a circular references.

No matter what, I don't think that disk3 should be there at all.

joshoram80 commented 5 years ago

I removed that disk3 line, and yes the links point to the correct location the links are all owned by the same user account as well

JohnDoee commented 5 years ago

You might need to enable rtorrent to figure out what is really going on. You can find an example here https://plaza.quickbox.io/t/where-is-rtorrent-log-file/1865

rtorrent isn't the easiest thing to debug, sadly.

JohnDoee commented 5 years ago

You're right that it actually works for some time, the logs say that you actually uploaded some data.

Another reason can be a schedule in your .rtorrent.rc file, it would look similar to

schedule = untied_directory,5,60,stop_untied= or something else with untied.

A hint is that the torrent is allowed to run for 60 seconds. This would all be related to a watch directory setup of some kind.

joshoram80 commented 5 years ago

OK so that's all working now. I have an issue still when autotorrent is run from a script that is run when a download is completed (via rtorrent.rc entry). Autotorrent seems to create the folder and symlinks as it should but the torrent does not get added to rtorrent.

If I run autorrent manually after this it says [Exists] 'XXXXXXXXXXXXXX' The folder exist, but is not seeded by torrentclient

Manually deleting this folder and then running Autorrent again, the torrent is added correctly. By this time it is usually too late and most of the benefit of cross seeding is lost. Everything works perfectly when done manually but automation is given me a headache.

The script that is run by rtorrent is only 2 lines, one to rebuild database and the other to add torrents. I have noticed that I have to use the -c parameter when running autorrent from anywhere but cd'd into the directory where it is located.

JohnDoee commented 5 years ago

My guess would be that you have something that removes the torrent after autotorrent adds it. The process is like this:

I have noticed that I have to use the -c parameter when running autorrent from anywhere but cd'd into the directory where it is located.

Yeah, no global user config, mostly because earlier it was useful to have multiple config files.