mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
committed by
GitHub
parent
8b7fdf0f22
commit
3b38d0de7f
@@ -403,17 +403,27 @@ QString TorrentImpl::name() const
|
||||
|
||||
QDateTime TorrentImpl::creationDate() const
|
||||
{
|
||||
return m_torrentInfo.creationDate();
|
||||
if (!hasMetadata())
|
||||
return {};
|
||||
|
||||
const std::time_t date = nativeTorrentInfo()->creation_date();
|
||||
return ((date != 0) ? QDateTime::fromSecsSinceEpoch(date) : QDateTime());
|
||||
}
|
||||
|
||||
QString TorrentImpl::creator() const
|
||||
{
|
||||
return m_torrentInfo.creator();
|
||||
if (!hasMetadata())
|
||||
return {};
|
||||
|
||||
return QString::fromStdString(nativeTorrentInfo()->creator());
|
||||
}
|
||||
|
||||
QString TorrentImpl::comment() const
|
||||
{
|
||||
return m_torrentInfo.comment();
|
||||
if (!hasMetadata())
|
||||
return {};
|
||||
|
||||
return QString::fromStdString(nativeTorrentInfo()->comment());
|
||||
}
|
||||
|
||||
bool TorrentImpl::isPrivate() const
|
||||
|
||||
Reference in New Issue
Block a user