Kimbatt / torrent-creator

Create torrent files in your browser.
https://kimbatt.github.io/torrent-creator/
114 stars 38 forks source link

Question: where the "source" field is officially defined? #10

Closed josecelano closed 1 year ago

josecelano commented 1 year ago

Hi @Kimbatt, Im looking for an official BEP or something where the "source" field is defined. In the README says:

Source: Arbitrary text. Setting the source of a torrent can be used to produce a different info hash. Can be empty.

It`s the only information I have not about that field.

I'm trying to fix a bug on a project I'm contributing. The infohash is not generated well because the torrent has the field:

https://github.com/torrust/torrust-index-backend/issues/242

Kimbatt commented 1 year ago

Hi, I saw this field in the qBittorrent torrent creator, that's why I've added it. Not sure if there is an official specification for this.

Relevant part from qBittorrent: https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/torrentcreatorthread.cpp#L203 Which was added by this commit: https://github.com/qbittorrent/qBittorrent/commit/8dcf326576fdb30030a4609291ca732b491863f0 Which was implemented because of this issue: https://github.com/qbittorrent/qBittorrent/issues/7965

Mentioned in that issue: https://github.com/kz26/dottorrent/blob/master/dottorrent/__init__.py#L78 Which was added by this commit: https://github.com/kz26/dottorrent/pull/4/commits/dbc2a26ab08415a339dcd552adf81f9eed7a1159

I also found these: https://redd.it/93sepm https://redd.it/jjq02i https://redd.it/ppo9q2

I think the info dictionary can contain arbitrary keys in addition to the specified ones (but not sure about this, couldn't find anything official).

josecelano commented 1 year ago

Hi, I saw this field in the qBittorrent torrent creator, that's why I've added it. Not sure if there is an official specification for this.

Relevant part from qBittorrent: https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/torrentcreatorthread.cpp#L203 Which was added by this commit: qbittorrent/qBittorrent@8dcf326 Which was implemented because of this issue: qbittorrent/qBittorrent#7965

Mentioned in that issue: https://github.com/kz26/dottorrent/blob/master/dottorrent/__init__.py#L78 Which was added by this commit: kz26/dottorrent@dbc2a26

I also found these: https://redd.it/93sepm https://redd.it/jjq02i https://redd.it/ppo9q2

I think the info dictionary can contain arbitrary keys in addition to the specified ones (but not sure about this, couldn't find anything official).

Hi @Kimbatt thank you very much! I have only taken a look at https://www.libtorrent.org/ (and its repo code) because I think qBitorrent is using it.

I've also opened a discussion on the qBittorrent repo: https://github.com/qbittorrent/qBittorrent/discussions/19406

I've reached the same conclusion as you that you can put everything in the info dictionary, but I wanted to know if there is an official BEP or the original reason why some clients are using it. As you mentioned, it seems the purpose is just to change the infohash due to the problem described here by @2wicked.