mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Save "resume data" once file priority is changed
This commit is contained in:
committed by
Vladimir Golovnev (glassez)
parent
48d532777a
commit
cd6959b712
@@ -1876,6 +1876,14 @@ void TorrentImpl::handleFileCompletedAlert(const lt::file_completed_alert *p)
|
||||
}
|
||||
}
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20003)
|
||||
void TorrentImpl::handleFilePrioAlert(const lt::file_prio_alert *p)
|
||||
{
|
||||
if (m_nativeHandle.need_save_resume_data())
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
void TorrentImpl::handleMetadataReceivedAlert(const lt::metadata_received_alert *p)
|
||||
{
|
||||
Q_UNUSED(p);
|
||||
@@ -1913,6 +1921,11 @@ void TorrentImpl::handleAlert(const lt::alert *a)
|
||||
{
|
||||
switch (a->type())
|
||||
{
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20003)
|
||||
case lt::file_prio_alert::alert_type:
|
||||
handleFilePrioAlert(static_cast<const lt::file_prio_alert*>(a));
|
||||
break;
|
||||
#endif
|
||||
case lt::file_renamed_alert::alert_type:
|
||||
handleFileRenamedAlert(static_cast<const lt::file_renamed_alert*>(a));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user