file_progress support for magnet links
This commit is contained in:
parent
6cd2958fa4
commit
2665d2a4e1
|
@ -8101,6 +8101,8 @@ namespace libtorrent
|
|||
void torrent::file_progress(std::vector<float>& fp) const
|
||||
{
|
||||
fp.clear();
|
||||
if (!valid_metadata()) return;
|
||||
|
||||
fp.resize(m_torrent_file->num_files(), 1.f);
|
||||
if (is_seed()) return;
|
||||
|
||||
|
@ -8117,7 +8119,11 @@ namespace libtorrent
|
|||
|
||||
void torrent::file_progress(std::vector<size_type>& fp, int flags) const
|
||||
{
|
||||
TORRENT_ASSERT(valid_metadata());
|
||||
if (!valid_metadata())
|
||||
{
|
||||
fp.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
fp.resize(m_torrent_file->num_files(), 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue