mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
Add source field in Torrent creator. Closes #7965.
This field is often used for cross-seeding between (private) trackers.
This commit is contained in:
@@ -124,6 +124,14 @@ void TorrentCreatorThread::run()
|
||||
|
||||
if (isInterruptionRequested()) return;
|
||||
|
||||
libt::entry entry = newTorrent.generate();
|
||||
|
||||
// add source field
|
||||
if (!m_params.source.isEmpty())
|
||||
entry["info"]["source"] = m_params.source.toStdString();
|
||||
|
||||
if (isInterruptionRequested()) return;
|
||||
|
||||
// create the torrent
|
||||
std::ofstream outfile(
|
||||
#ifdef _MSC_VER
|
||||
@@ -137,7 +145,7 @@ void TorrentCreatorThread::run()
|
||||
|
||||
if (isInterruptionRequested()) return;
|
||||
|
||||
libt::bencode(std::ostream_iterator<char>(outfile), newTorrent.generate());
|
||||
libt::bencode(std::ostream_iterator<char>(outfile), entry);
|
||||
outfile.close();
|
||||
|
||||
emit updateProgress(100);
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace BitTorrent
|
||||
QString inputPath;
|
||||
QString savePath;
|
||||
QString comment;
|
||||
QString source;
|
||||
QStringList trackers;
|
||||
QStringList urlSeeds;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user