mirror of
https://github.com/transmission/transmission.git
synced 2026-05-02 06:33:04 +01:00
refactor: use tr_torrent_metainfo in tr ctor (#2345)
This commit is contained in:
@@ -142,7 +142,7 @@ static void onTorrentFileDownloaded(
|
||||
void* vctor)
|
||||
{
|
||||
auto* ctor = static_cast<tr_ctor*>(vctor);
|
||||
tr_ctorSetMetainfo(ctor, std::data(response), std::size(response));
|
||||
tr_ctorSetMetainfo(ctor, std::data(response), std::size(response), nullptr);
|
||||
waitingOnWeb = false;
|
||||
}
|
||||
|
||||
@@ -301,11 +301,11 @@ int tr_main(int argc, char* argv[])
|
||||
|
||||
if (tr_sys_path_exists(torrentPath, nullptr))
|
||||
{
|
||||
tr_ctorSetMetainfoFromFile(ctor, torrentPath);
|
||||
tr_ctorSetMetainfoFromFile(ctor, torrentPath, nullptr);
|
||||
}
|
||||
else if (memcmp(torrentPath, "magnet:?", 8) == 0)
|
||||
{
|
||||
tr_ctorSetMetainfoFromMagnetLink(ctor, torrentPath);
|
||||
tr_ctorSetMetainfoFromMagnetLink(ctor, torrentPath, nullptr);
|
||||
}
|
||||
else if (memcmp(torrentPath, "http", 4) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user