forked from premiere/premiere-libtorrent
we no longer support including file-hashes when creating torrents
This commit is contained in:
parent
6214aef0c5
commit
13a9c3c78d
|
@ -130,9 +130,6 @@ void print_usage()
|
|||
" merkle torrents require client support\n"
|
||||
" the resulting full merkle tree is written to\n"
|
||||
" the specified file\n"
|
||||
"-f include sha-1 file hashes in the torrent\n"
|
||||
" this helps supporting mixing sources from\n"
|
||||
" other networks\n"
|
||||
"-w url adds a web seed to the torrent with\n"
|
||||
" the specified url\n"
|
||||
"-t url adds the specified tracker to the\n"
|
||||
|
@ -223,9 +220,6 @@ int main(int argc, char* argv[])
|
|||
++i;
|
||||
outfile = argv[i];
|
||||
break;
|
||||
case 'f':
|
||||
flags |= create_torrent::calculate_file_hashes;
|
||||
break;
|
||||
case 'l':
|
||||
flags |= create_torrent::symlinks;
|
||||
break;
|
||||
|
|
|
@ -140,12 +140,6 @@ namespace libtorrent
|
|||
// is useful if you need to reconstruct a file hierarchy which contains
|
||||
// symlinks.
|
||||
, symlinks = 8
|
||||
|
||||
// If this is set, the set_piece_hashes() function will, as it calculates
|
||||
// the piece hashes, also calculate the file hashes and add those associated
|
||||
// with each file. Note that unless you use the set_piece_hashes() function,
|
||||
// this flag will have no effect.
|
||||
, calculate_file_hashes = 16
|
||||
};
|
||||
|
||||
// The ``piece_size`` is the size of each piece in bytes. It must
|
||||
|
@ -277,9 +271,6 @@ namespace libtorrent
|
|||
int piece_length() const { return m_files.piece_length(); }
|
||||
int piece_size(int i) const { return m_files.piece_size(i); }
|
||||
|
||||
// internal
|
||||
bool should_add_file_hashes() const { return m_calculate_file_hashes; }
|
||||
|
||||
// This function returns the merkle hash tree, if the torrent was created as a merkle
|
||||
// torrent. The tree is created by ``generate()`` and won't be valid until that function
|
||||
// has been called. When creating a merkle tree torrent, the actual tree itself has to
|
||||
|
@ -359,11 +350,6 @@ namespace libtorrent
|
|||
// the torrent file. The full data of the pointed-to
|
||||
// file is still included
|
||||
bool m_include_symlinks:1;
|
||||
|
||||
// this is only used by set_piece_hashes(). It will
|
||||
// calculate sha1 hashes for each file and add it
|
||||
// to the file list
|
||||
bool m_calculate_file_hashes:1;
|
||||
};
|
||||
|
||||
namespace detail
|
||||
|
|
|
@ -251,7 +251,6 @@ namespace libtorrent
|
|||
, m_merkle_torrent((flags & merkle) != 0)
|
||||
, m_include_mtime((flags & modification_time) != 0)
|
||||
, m_include_symlinks((flags & symlinks) != 0)
|
||||
, m_calculate_file_hashes((flags & calculate_file_hashes) != 0)
|
||||
{
|
||||
TORRENT_ASSERT(fs.num_files() > 0);
|
||||
|
||||
|
@ -306,7 +305,6 @@ namespace libtorrent
|
|||
, m_merkle_torrent(ti.is_merkle_torrent())
|
||||
, m_include_mtime(false)
|
||||
, m_include_symlinks(false)
|
||||
, m_calculate_file_hashes(false)
|
||||
{
|
||||
TORRENT_ASSERT(ti.is_valid());
|
||||
if (ti.creation_date()) m_creation_date = *ti.creation_date();
|
||||
|
|
Loading…
Reference in New Issue