mirror of https://github.com/aria2/aria2
UnknownLengthPieceStorage: return piece length
show something in console status when downloading items with unknown content lengthpull/1065/head
parent
3c6a70c566
commit
eef212d72a
|
@ -210,6 +210,15 @@ bool UnknownLengthPieceStorage::isPieceUsed(size_t index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64_t UnknownLengthPieceStorage::getCompletedLength()
|
||||||
|
{
|
||||||
|
// TODO we have to return actual completed length here?
|
||||||
|
if (piece_) {
|
||||||
|
return piece_->getLength();
|
||||||
|
}
|
||||||
|
return totalLength_;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<DiskAdaptor> UnknownLengthPieceStorage::getDiskAdaptor()
|
std::shared_ptr<DiskAdaptor> UnknownLengthPieceStorage::getDiskAdaptor()
|
||||||
{
|
{
|
||||||
return diskAdaptor_;
|
return diskAdaptor_;
|
||||||
|
|
|
@ -162,11 +162,7 @@ public:
|
||||||
return totalLength_;
|
return totalLength_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int64_t getCompletedLength() CXX11_OVERRIDE
|
virtual int64_t getCompletedLength() CXX11_OVERRIDE;
|
||||||
{
|
|
||||||
// TODO we have to return actual completed length here?
|
|
||||||
return totalLength_;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int64_t getFilteredCompletedLength() CXX11_OVERRIDE
|
virtual int64_t getFilteredCompletedLength() CXX11_OVERRIDE
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue