rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.08k stars 408 forks source link

.meta files somewhere else #343

Open hboetes opened 8 years ago

hboetes commented 8 years ago

Is it possible to store the .meta files elsewhere? I think they should be stored in the .session dir, not in the download dir.

alex3kov commented 8 years ago

+1, they are clogging download dir.

chros73 commented 8 years ago

What meta files are we talking about? The original one (that was put into watch directory) or the one that rtorrent has been created (inside session directory)? Have you specified a session directory in rtorrent config?

hboetes commented 8 years ago
omgiafs commented 8 years ago

i just run next script by cron:

#!/bin/bash
DIR="ROOT_FOLDER_FOR_ALL_TORRENTS"
find $DIR -name \*.meta -type f -delete

This is workaround, but moving *.meta files elsewhere would be better than my method.

tobia commented 8 years ago

Can anybody familiar with the source code say if / when it's OK to delete these .meta files? (the ones created in the download dir when a magnet URL is used)

hboetes commented 8 years ago

They are basically torrent files, required to download and check the torrent. So removing them when the torrent is disabled seems fine. This actually happens when the torrent actually finished. But in case the torrent never downloaded in the first place an empty file is created and that file is never removed. IMHO they should be stored in the .session directory.

Han

On Fri, Feb 19, 2016 at 7:16 PM, Tobia notifications@github.com wrote:

Can anybody familiar with the source code say if / when it's OK to delete these .meta files? (the ones created in the download dir when a magnet URL is used)

— Reply to this email directly or view it on GitHub https://github.com/rakshasa/rtorrent/issues/343#issuecomment-186343387.

artyuum commented 8 years ago

I also think that .meta files should be stored in .session directory.

rakshasa commented 8 years ago

This is a change that someone else should easily be able to implement.

Just make a meta torrent dir variable and use session if not set. The time to implement and test is why I'm not doing this, not because I won't accept a patch.

chros73 commented 8 years ago

A.

Just make a meta torrent dir variable and use session if not set.

  1. It's a good idea, but the ideal would be if with some command parameter we can specify their place per torrent (e.g. a watch directory, that we can have more than one), since the downloaded meta file is tied to the torrent (similar way as a torrent file).
  2. Where are these meta files are created in the code? I couldn't find it, neither in rtorrent nor in libtorrent project.

B.

  1. There is a bug (probably it was a feature at some point :) ) in the produced meta file: it doesn't include info part, it starts with files straight away. The result is an invalid file, e.g. lstor from pyrocore can't process them.
    • currently: d5:filesld6:length
    • correct way: d4:infod5:filesld6:length
  2. Is it possible to include tracker info (if there's any) in these meta files? It'd be perfect in this way:
    • if there's tracker info then include it and use .torrent extension (we get a full valid torrent file)
    • if there isn't: then use .meta extension (as it is now, with the above fix)
rakshasa commented 8 years ago

Meta files are just normal torrents that rtorrent creates, except they have a metadata variable set. (in loading of torrents iirc)

There's some special handling done in libtorrent too iirc, however just start from the point where rtorrent is passed a magnet link to load, and do some grep'ing of the variables it sets.

Feriman22 commented 5 years ago

Hi,

This issue is still existing and should be store these *.meta files in session folder.

Is there any solution since last commment in this thread?

Thanks!

chros73 commented 5 years ago

This issue is still existing and should be store these *.meta files in session folder.

Here's a workaround that I use in my setup, but helper commands are all over place, so you can't just copy-paste the block. And this is the simplified version of the above.