mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07:00
Set metadata asynchronously
This commit is contained in:
parent
7022adb89b
commit
1f3f96f7aa
1 changed files with 16 additions and 2 deletions
|
@ -5759,14 +5759,28 @@ void SessionImpl::handleTorrentConflictAlert(const lt::torrent_conflict_alert *a
|
||||||
else
|
else
|
||||||
cancelDownloadMetadata(torrentIDv1);
|
cancelDownloadMetadata(torrentIDv1);
|
||||||
|
|
||||||
torrent2->nativeHandle().set_metadata(a->metadata->info_section());
|
invokeAsync([torrentHandle = torrent2->nativeHandle(), metadata = a->metadata]
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
torrentHandle.set_metadata(metadata->info_section());
|
||||||
|
}
|
||||||
|
catch (const std::exception &) {}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (torrent1)
|
else if (torrent1)
|
||||||
{
|
{
|
||||||
if (!torrent2)
|
if (!torrent2)
|
||||||
cancelDownloadMetadata(torrentIDv2);
|
cancelDownloadMetadata(torrentIDv2);
|
||||||
|
|
||||||
torrent1->nativeHandle().set_metadata(a->metadata->info_section());
|
invokeAsync([torrentHandle = torrent1->nativeHandle(), metadata = a->metadata]
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
torrentHandle.set_metadata(metadata->info_section());
|
||||||
|
}
|
||||||
|
catch (const std::exception &) {}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue