|
|
|
@ -4224,9 +4224,11 @@ void Session::handleAlert(const lt::alert *a)
@@ -4224,9 +4224,11 @@ void Session::handleAlert(const lt::alert *a)
|
|
|
|
|
case lt::file_error_alert::alert_type: |
|
|
|
|
handleFileErrorAlert(static_cast<const lt::file_error_alert*>(a)); |
|
|
|
|
break; |
|
|
|
|
#if (LIBTORRENT_VERSION_NUM < 10208) |
|
|
|
|
case lt::read_piece_alert::alert_type: |
|
|
|
|
handleReadPieceAlert(static_cast<const lt::read_piece_alert*>(a)); |
|
|
|
|
break; |
|
|
|
|
#endif |
|
|
|
|
case lt::add_torrent_alert::alert_type: |
|
|
|
|
handleAddTorrentAlert(static_cast<const lt::add_torrent_alert*>(a)); |
|
|
|
|
break; |
|
|
|
@ -4357,9 +4359,11 @@ void Session::createTorrentHandle(const lt::torrent_handle &nativeHandle)
@@ -4357,9 +4359,11 @@ void Session::createTorrentHandle(const lt::torrent_handle &nativeHandle)
|
|
|
|
|
if (torrent->hasError()) |
|
|
|
|
LogMsg(tr("Torrent errored. Torrent: \"%1\". Error: %2.").arg(torrent->name(), torrent->error()), Log::WARNING); |
|
|
|
|
|
|
|
|
|
// Check if file(s) exist when using seed mode
|
|
|
|
|
#if (LIBTORRENT_VERSION_NUM < 10208) |
|
|
|
|
// Check if file(s) exist when using skip hash check
|
|
|
|
|
if (params.skipChecking && torrent->hasMetadata()) |
|
|
|
|
nativeHandle.read_piece(lt::piece_index_t(0)); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Session::handleAddTorrentAlert(const lt::add_torrent_alert *p) |
|
|
|
@ -4464,6 +4468,7 @@ void Session::handleFileErrorAlert(const lt::file_error_alert *p)
@@ -4464,6 +4468,7 @@ void Session::handleFileErrorAlert(const lt::file_error_alert *p)
|
|
|
|
|
m_recentErroredTorrentsTimer->start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if (LIBTORRENT_VERSION_NUM < 10208) |
|
|
|
|
void Session::handleReadPieceAlert(const lt::read_piece_alert *p) const |
|
|
|
|
{ |
|
|
|
|
if (p->error) { |
|
|
|
@ -4471,6 +4476,7 @@ void Session::handleReadPieceAlert(const lt::read_piece_alert *p) const
@@ -4471,6 +4476,7 @@ void Session::handleReadPieceAlert(const lt::read_piece_alert *p) const
|
|
|
|
|
p->handle.force_recheck(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
void Session::handlePortmapWarningAlert(const lt::portmap_error_alert *p) |
|
|
|
|
{ |
|
|
|
|