refactor: change announce and announceList#119
Conversation
|
I don't know if this change will follow the specification BEP12
What do you think? |
|
@hicom150 yeah, that's what I was referring to. The specification tells you what to do for the implementation of reading a torrent but not for the creation. In fact, the specification implicitly mentions that torrents can have both So from what I understand, this PR takes both of these client implementations into account. |
announce and announceListannounce and announceList
|
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[ ] Bug fix
[ ] New feature
[X] Other, please explain:
announceandannounceListparametersWhat changes did you make? (Give an overview)
This PR:
announceandannounceList. The current code in master, depends onannounceListbeing false to be able to use theopts.announce; which is good for parsing the torrent. But since we are creating it, I think we should allow to set both values (with no dependency on being false).For example:
If we use
announce = "wss://example1.com"andannounceList = [["wss://example2.com"]]The current code in master, would ignore the value in
announce. This PR adds theannouncevalue toannounceList.Which issue (if any) does this pull request address?
Not directly, but the issue seen in #118 would have had a better output. In that particular case (with the new changes), an invalid
announceListwill not throw an error and just discard the invalid trackers.Is there anything you'd like reviewers to focus on?