|
|
@ -185,17 +185,15 @@ InfoHash TorrentHandleImpl::hash() const |
|
|
|
|
|
|
|
|
|
|
|
QString TorrentHandleImpl::name() const |
|
|
|
QString TorrentHandleImpl::name() const |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString name = m_name; |
|
|
|
if (!m_name.isEmpty()) |
|
|
|
if (!name.isEmpty()) return name; |
|
|
|
return m_name; |
|
|
|
|
|
|
|
|
|
|
|
name = QString::fromStdString(m_nativeStatus.name); |
|
|
|
|
|
|
|
if (!name.isEmpty()) return name; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hasMetadata()) |
|
|
|
if (hasMetadata()) |
|
|
|
{ |
|
|
|
return m_torrentInfo.name(); |
|
|
|
name = QString::fromStdString(m_torrentInfo.nativeInfo()->orig_files().name()); |
|
|
|
|
|
|
|
if (!name.isEmpty()) return name; |
|
|
|
const QString name = QString::fromStdString(m_nativeStatus.name); |
|
|
|
} |
|
|
|
if (!name.isEmpty()) |
|
|
|
|
|
|
|
return name; |
|
|
|
|
|
|
|
|
|
|
|
return m_hash; |
|
|
|
return m_hash; |
|
|
|
} |
|
|
|
} |
|
|
|