Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#3754 closed Enhancement (invalid)

Move removed (completed) torrents to a different directory

Reported by: Amp_God Owned by: charles
Priority: Normal Milestone: None Set
Component: libtransmission Version: 2.12+
Severity: Major Keywords: download-directory completed-directory removed-directory
Cc:

Description

This would ease a *lot* when dealing with several torrents at once. Once the torrent gets removed from the download list, the data would be moved to a user specified directory.

Azureus supports this. eg. folders:

Bittorrent --< All the torrents currently downloading

Bittorrent-Completed --< All the torrents completed but seeding

Bittorrent-2Sort --< All the torrents completed and removed

Change History (19)

comment:1 in reply to: ↑ description Changed 11 years ago by charles

  • Resolution set to duplicate
  • Status changed from new to closed

Replying to Amp_God:

Once the torrent gets removed from the download list, the data would be moved to a user specified directory.

Transmission already has this feature.

Closing as a duplicate of #1483

comment:2 Changed 11 years ago by Amp_God

Thats only half of what i was suggesting. That feature moves it to the 2nd folder when the download *completes* not when its complete and removed.

I meant three (3) directories, not two.

1st stage/dir) Torrent downloading

2nd stage/dir) Torrent downloaded and seeding

3rd stage/dir) Torrent downloaded fully and removed from seeding list.

First two exists, but not the 3rd stage. I was suggesting the 3rd.

Last edited 11 years ago by Amp_God (previous) (diff)

comment:3 Changed 11 years ago by livings124

comment:4 Changed 11 years ago by Amp_God

Not the same thing. Seeding ratio completed does not move the torrent´s data.

Last edited 11 years ago by Amp_God (previous) (diff)

comment:5 Changed 11 years ago by Amp_God

  • Resolution duplicate deleted
  • Status changed from closed to reopened

comment:6 Changed 11 years ago by charles

  • Resolution set to duplicate
  • Status changed from reopened to closed

Seeding ratio completed doesn't move the torrent's data, but that's what you're requesting and that's what #3612 is requesting... unless I'm misunderstanding something...

comment:7 Changed 11 years ago by Amp_God

Thats different alright.

I see three stages when downloading torrent(s)...

Stage 1) Downloading the pieces and saving them

Stage 2) Seeding it back to other users

Stage 3) When the torrent is removed from transmission (removed from seeding)

Stages 1 and 2 exists already but the stage 3 is missing. Kinda annoying when still-seeded torrents and removed torrents are on the same folder.

Version 0, edited 11 years ago by Amp_God (next)

comment:8 Changed 11 years ago by livings124

#3612 moves it when it finishes seeding. This is not the same as actually removing it from the app, but it's close enough and won't be added.

comment:9 Changed 11 years ago by Amp_God

Not even close to #3612. Cant be too hard to add eh?

comment:10 follow-up: Changed 11 years ago by charles

First, this seems very very close to #3612, if not identical. If it's "not even close" then you need to spell out specifically, in English, how it's different from #3612.

Second, I also don't understand what "Bittorrent-2Sort" or "File.move.download.removed.path" are supposed to mean. What does "Bittorrent-2Sort" mean? Is that the path where torrents go after they've finished seeding?

Thirdly, if it "can't be too hard to add eh", feel free to attach a patch to this ticket.

Last edited 11 years ago by charles (previous) (diff)

comment:11 Changed 11 years ago by Amp_God

Sorry about that. I have tried to explain it by best of my ability...

3 Folders:

Bittorrent --< Stuff thats downloading

Bittorrent-Completed --< Stuff thats downloaded fully but are seeded

Bittorrent-2Sort --< Stuff thats downloaded fully *and* removed from transmission.

2Sort = To Sort --> To be sorted further to their own archives.

Currently all the completed torrents and old data are on the same folder. It gets kinda annoying to sort it manually folder-by-folder when there are 10+ torrents that are still seeding and 10+ torrents that are old and removed from transmission.

I think that this feature only needs a directory spesification on the config and move-order on the remove command.

Sorry about that cant be too hard to add thingie, i was getting kinda frustrated trying to re-explain it again and again.

Last edited 11 years ago by Amp_God (previous) (diff)

comment:12 in reply to: ↑ 10 Changed 11 years ago by floodo1

Replying to charles:

First, this seems very very close to #3612, if not identical. If it's "not even close" then you need to spell out specifically, in English, how it's different from #3612.

As I understand it, #3612 is requesting that a torrent, which has reached the seeding ratio limit, be moved to a user definable directory.....let's call it "seeding-complete-directory"

Now, this request #3754, is requesting that a torrent, which is REMOVED (whether or not seeding is complete), be moved to a user definalbe directory.....let's call it "torrent-has-been-removed-directory"

Second, I also don't understand what "Bittorrent-2Sort" or "File.move.download.removed.path" are supposed to mean. What does "Bittorrent-2Sort" mean? Is that the path where torrents go after they've finished seeding?

So, going on what I have said above, "Bitttorrent-2Sort" translates to "torrent-has-been-removed-directory". Again, this would be the directory that torrents go to when they have been REMOVED (whether or not they have finished seeding).

Thirdly, if it "can't be too hard to add eh", feel free to attach a patch to this ticket.

Please, don't take offense that this guy has no clue how hard it is to actually implement the things we request.

---

Let me paint a picture of why this feature, as well as the seeding complete feature, and remove after seeding complete feature, are all so vital to an automated torrent system......which is something that can be achieved more easily with Azureus which has these features.

The idea is to have a folder structure that mimics the downloading, seeding, and removed (not seeding, not downloading, not paused) torrents running through Tranmission. So we download a torrent, which gets put in the "in.progress" directory. When this finished it gets moved to the "seeding" folder. Now we know not to mess with the files in this folder because they are still active.

Currently, this is all that you can do with Transmission. All torrents that finish downloading get put into the "seeding" folder. Now, some of these actively seeding torrents are going to hit the seeding ratio limit, and stop seeding. It would be nice if these files were automatically moved from the "seeding" folder to a "no.longer.active" folder. ----- this is #3612 request -----

Additionally, sometimes we, the user, muddle with the seeding, and remove torrents before they hit the seeding ratio limit. Currently, these files stay in the "seeding" directory, even after they are removed from Transmission. It would be nice if we could have these files automatically move to a folder called "removed" ---- this is #3754 request -----

In this way, we, the user or scripts that we write, can know that any files in the "seeding" directoy are active, and hence can't be messed with. Meanwhile the "no.longer.active" and "removed" folders (which most people would just combine into one folder, say the "done" folder) ONLY contain files which are safe to mess with (change, delete, whatever).

These are features, which people who have left Azureus surely miss. It makes it easier to know what to do with the files that are in what I have referred to as the "seeding" folder. It's really annoying when I try to move some files out of that directory, only to get an error about how the files are being accessed by Transmission. If the files were automatically seperated, as an option of course, it would help at least some of us out quite a bit!

comment:13 Changed 11 years ago by Amp_God

  • Resolution duplicate deleted
  • Status changed from closed to reopened

floodo1, thanks.

Im quite good php programmer but C/C#/C++ are not my specialities even though i know the basics. :)

comment:14 follow-up: Changed 11 years ago by charles

floodo1, thanks for the explanation. I now understand the request :)

So that's the "what" out of the way. Now as for the "why"... the part of your explanation that starts with "Let me paint a picture of why this feature... [is] so vital..." does give a good summary of how #3612 -- adding a "done" directory -- could be useful. However it doesn't explain the use case for breaking "done" into "no.longer.active" and "remove". In fact, you agree that most people would leave it as just one "done" folder, and then move on to say how Vuze users miss this feature -- not a good yardstick for Transmission, since Vuze has many bloated features Transmission intentionally steers clear of -- and then talk about how annoying it is to try to move files out of "seeding" when they're in use, which would also be solved by #3612.

So all in all, I'm more in favor of #3612 than I was before, the reason for #3754 is still unclear to me. #3612 will add code complexity, but with a payoff. #3754 would as well, but I don't see the payoff. Could you give some use cases for #3754, rather than (#3612 + #3754)?

comment:15 in reply to: ↑ 14 ; follow-up: Changed 11 years ago by floodo1

Ok, now that the what is clear, here is more about the why.

#3612, is an attempt to automatically move torrents that have finished seeding, according to the seeding ratio that is specified in the global preferences, or the ratio that has been specifically defined for that torrent (via that torrent's options).

This ticket (#3754) is to automatically move torrents that the USER removes (rather than the "this torrent has met it's seeding ratio).

Personally, I have my default seed ratio set to 2.0 however some torrents that I download just don't need (in my opinion) to be seeded quite that long. Or sometimes a torrent stalls out way before it gets to 2.0 .........in either case I'll come along and manually remove the torrent. --Problem is that when I do this, the torrents stay in the same "completed" directory as actively seeding torrents.....so later on I come to this directory and have to check Transmission to see what is still active.


In a nutshell I think that BOTH of these tickets should be combined into a new one with the following simply defined feature "if a torrent is removed by the user or hits the seeding ratio limit, move it to a user specifiable directory"

The goal of both of these tickets is so that users can look at their torrent directories and know which files are safe to move/modify, and which ones musn't be touched because they are still active. As it stands now, ALL torrents once they've finished downloading, regardless of if they are active or not, end up int he same "completed" or "downloaded" directory.

I've seen some scripts that for each file in a given directory probe Transmission (via commandline i guess) and check if that file is active or not, then move it for you if not....but relying on scripts sucks :)

comment:16 in reply to: ↑ 15 Changed 11 years ago by leena

Replying to floodo1:

I've seen some scripts that for each file in a given directory probe Transmission (via commandline i guess) and check if that file is active or not, then move it for you if not....but relying on scripts sucks :)

Actually, I think with better script support the transmission devs wouldn't have to accommodate every person's slightly different use case.

comment:17 follow-up: Changed 11 years ago by charles

  • Resolution set to invalid
  • Status changed from reopened to closed

Okay. So far the "why" of all the comments in this tickets boils down to:

"in either case I'll come along and manually remove the torrent. --Problem is that when I do this, the torrents stay in the same "completed" directory as actively seeding torrents....."

...so this feature is shorthand for users who don't want to pause a torrent and then move it manually.

floodo1 I appreciate the time you've spent explaining this to me, but to be honest it seems like a very rarified feature that few people will use. It feels more like a couple of ex-Azureus users requesting a feature that it had so that Transmission can conform to their workflow.

comment:18 in reply to: ↑ 17 Changed 11 years ago by floodo1

Replying to charles:

My personal reasons for wanting it are so that it's easier to automate my workflow.

Really though, #3754 and #3612, both are just mirrors of the pre-existing "Keep incomplete files in" a user defined directory feature. Ask yourself why the option to define an incomplete directory exists....pretty sure the answer is "so that torrents that are still downloading dont show up in my "default" folder.

I find it strange that nearly all transmission users like the fact that any file which has been downloaded will end up in the same folder, no matter what it's status is: seeding, seeding complete, removed. ESPECIALLY when you consider that any file(s) that are actively seeding absolutely must not be changed/moved/deleted by the user in order for seeding to continue. ---- THIS is my concern (which is not related to automation).... that if you don't go one by one, and move the files as you remove the torrent from Transmission, it becomes VERY easy to get confused about which files are still seeding and need to stay put.

I understand that Transmission aims to be simple, but I don't see how this feature is any more confusing than the existing "incomplete" folder option. Then again Transmission still can't do RSS so maybe i'm barking up the wrong tree. It's just painful to wish that I still used Azureus because it has so many useful features, but know that I won't use it because of it's footprint!

comment:19 Changed 10 years ago by markfaine

I had intended on submitting a ticket and found this one but it sadly it is marked as invalid.

I'd like to try and make a case for it if I may. Please see Sickbeard's autoProcessTV

Currently to process a directory of video files that have completed seeding through sickbeard I must run a script (via cron) that first moves the torrents that have completed seeding to another directory. Then I call autoProcessTV with the "completed seeding" directory as an argument.

#!/usr/bin/env python2.5

import os
import sys
import shutil
import autoProcessTV
import transmissionrpc

DONE_DIR='/volume1/video/complete'
TRANSMISSION_USER='transmission'
TRANSMISSION_GROUP='users'

# File permissions
os.umask(0)

def safeDirCreate(theDir):
        """ mkdir -p """
        try:
                os.makedirs(theDir)
        except OSError:
                if os.path.isdir(theDir):
                # We are nearly safe
                        pass
                else:
                #There was an error on creation, so make sure we know about it
                        raise

def getTorrentFiles(id):
        """ Return a list of torrent files from a given torrent by ID """
        global client
        global session
        global base_dir
        torrent = client.info(id)[id]
        files = torrent.files()
        download_dir = base_dir 
        torrent_files = []
        for key in files:
                torrent_name = files[key]['name']
                torrent_files.append(os.path.join(download_dir, torrent_name))
                return torrent_files

# Ensure completed directory exists
if os.path.exists(DONE_DIR) is False:
        safeDirCreate(DONE_DIR)

# Get client                                           
try:
  client = transmissionrpc.Client('192.168.1.101', port=9091, user='myusername', password='mypassword')
  session = client.get_session()
  base_dir = client.get_session().fields['download_dir'] 
except transmissionrpc.error:
  sys.exit(1)

#Move completed torrents

torrents = client.info()
for tid, torrent in torrents.iteritems():
        if torrent.status.lower() != 'stopped':
                continue
                     
        # prepare and copy all torrent files, if any fail to copy set archived to false
        tfiles = getTorrentFiles(torrent.id)
        if tfiles is not None and len(tfiles) >= 1:
                for afile in tfiles:
                        shutil.move(afile, DONE_DIR)
                        #print "Torrent File: %s" % afile                                                                                                       
        client.remove(torrent.id)                        
            
autoProcessTV.processEpisode(DONE_DIR)

instead of simply

#!/usr/bin/env python2.5

import os
import sys
import autoProcessTV

TORRENTDIR="/volume1/video/complete"
autoProcessTV.processEpisode(TORRENTDIR)

If transmission could support a third directory (completed seeding or removed by user) then all I would need would be the simple wrapper version of the script which would all but eliminate the potential for error during the processing by sickbeard.

Note: See TracTickets for help on using tickets.