Setting for creating subfolder on multifile torrents. Closes #588.

This commit is contained in:
sledgehammer999
2015-11-07 20:44:53 +02:00
committed by Vladimir Golovnev (Glassez)
parent 07af8c9648
commit 4b2d8a7941
13 changed files with 88 additions and 5 deletions

View File

@@ -276,6 +276,18 @@ TorrentInfo::PieceRange TorrentInfo::filePieces(int fileIndex) const
static_cast<int>((firstOffset + fileSize - 1) / pieceLength()));
}
libtorrent::file_storage TorrentInfo::files() const
{
if (!isValid()) return libtorrent::file_storage();
return m_nativeInfo->files();
}
libtorrent::file_storage TorrentInfo::origFiles() const
{
if (!isValid()) return libtorrent::file_storage();
return m_nativeInfo->orig_files();
}
void TorrentInfo::renameFile(uint index, const QString &newPath)
{
if (!isValid()) return;
@@ -293,6 +305,12 @@ int BitTorrent::TorrentInfo::fileIndex(const QString& fileName) const
return -1;
}
void TorrentInfo::remapFiles(libtorrent::file_storage const &fileStorage)
{
if (!isValid()) return;
m_nativeInfo->remap_files(fileStorage);
}
TorrentInfo::NativePtr TorrentInfo::nativeInfo() const
{
return m_nativeInfo;