idlesign / torrentool

The tool to work with torrent files.
https://github.com/idlesign/torrentool
BSD 3-Clause "New" or "Revised" License
148 stars 30 forks source link

Add source flag #27

Closed kickturn closed 1 year ago

kickturn commented 1 year ago

This issue from qbittorrent explains it well

Private trackers that use this often fill in a three letter code specific for their tracker. Users that upload torrents can add it themselves (using dottorrent-gui for example) or the tracker will add it and the uploader needs to download the torrent with added tag from the tracker to start the seeding. Often people use different a locations for uploads than the default download location. So they will have to move files or edit download location and do a force recheck. If it would be implemented in the normal torrent creation process it would be much easier especially for novice users.

If if was not clear this is done to be able to cross-seed the same content between different private trackers. If no difference is made between the torrents the tracker addresses of the 2nd torrent will be added to the first and the seeders of both trackers will be mixed by the client.

Basically, the purpose of it is to differentiate exactly same torrents on different trackers so peers from a different tracker can't come on another tracker ("peer-leak").

For me, adding these lines worked for creating a torrent or reading a torrent, I don't know if there's anything missing.

idlesign commented 1 year ago

Thank you.

Almost ready to merge, but please add a simple test case (e.g. like https://github.com/idlesign/torrentool/blob/master/tests/test_torrent.py#L161)

Related to #24

coveralls commented 1 year ago

Coverage Status

coverage: 98.353% (+0.02%) from 98.329% when pulling dcd55521e3b3a3fa398f8a337207e97243a988da on kickturn:master into 9079c1ddd436af5b969685e5a4cfda02a2ee8d0c on idlesign:master.

idlesign commented 1 year ago

Thank you. Merged.