|
|
|
@ -1694,21 +1694,6 @@ void QBtSession::saveFastResumeData() {
@@ -1694,21 +1694,6 @@ void QBtSession::saveFastResumeData() {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool QBtSession::isFilePreviewPossible(const QString &hash) const { |
|
|
|
|
// See if there are supported files in the torrent
|
|
|
|
|
const QTorrentHandle h = getTorrentHandle(hash); |
|
|
|
|
if (!h.is_valid() || !h.has_metadata()) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
const unsigned int nbFiles = h.num_files(); |
|
|
|
|
for (unsigned int i=0; i<nbFiles; ++i) { |
|
|
|
|
const QString extension = fsutils::fileExtension(h.filename_at(i)); |
|
|
|
|
if (misc::isPreviewable(extension)) |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void QBtSession::addTorrentsFromScanFolder(QStringList &pathList) |
|
|
|
|
{ |
|
|
|
|
foreach (const QString &file, pathList) { |
|
|
|
|