-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide v1 and v2 infohashes in UI #15097
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look at the UI later.
c6cdb74
to
3f11017
Compare
I didn't test v2 torrents (no access to libt v2) and i didn't test the %I %J %K parameters. Also the Copy sub-menu was not updated in WebUI. |
014d37f
to
f9c562e
Compare
Tested this on Windows 10 just now.
I tested with some of libtorrent's test torrents. Some things worked as expected, but I found a ton of bugs:
The remaining I did not test the "run external script" changes at all. Copying the ID, hashes, and magnet link from the context menu works fine. The v2 hash and torrent ID options should probably be greyed out for v1-only torrents though, as should the v1 hash option for v2-only. |
General remark Note, BitTorrent v2 is generally a draft, and we can not yet be sure what it will be in the end. Now there is a complete mess caused by an attempt to have some compatibility with existing trackers, etc., which is why we have to deal with the so-called reduced sha-256 info hashes of v2 torrents, which are used as a compatible info hash. I hope this will change by the final version of the protocol and trackers will be required to understand native info hashes. So if, given the above, you want to see the Torrent ID in General tab, then I will add it. |
Please create separate Issue for it. We really need to handle such cases before release qBittorrent based on libtorrent-v2. Dunno can we produce first beta release in current state. |
The "torrent ID" is not just some internal thing in qBittorrent. It is the 20-byte truncated v2 hash for v2-only and v2-byvrid torrents, and the normal 20-byte info hash for v1-only torrents. It stands on its own as a separate entity, which the protocol uses in some cases (https://www.bittorrent.org/beps/bep_0052.html):
It only matches the info hash in case of v1-only torrents.
I think BitTorrent v2 is pretty much final and we should operate under that assumption. It says "draft" in the BEP, but actually almost no BEP has been formally finalized (or even exited the "draft" stage), even though they have been in very widespread use for years: https://www.bittorrent.org/beps/bep_0000.html. I could be wrong though, and maybe there are still some significant changes planned. Let's see what @arvidn thinks about this. As far as I understand it from the spec, it was decided that for both v2-only torrents and v2 hybrid torrents, the contents of the
I would like an easy way to see it, but I don't think we should have a separate field for it, because it would be too redundant. After all, in the case of v1-only torrents it is the same as the v1 info hash, and in the case of v2-only or hybrid torrents it is the first 40 characters of the v2 info hash. That's why I suggested adding a small space between the first 40 characters and the last 24 in the v2 info hash field. Something like this:
Or maybe make the last 24 characters a slightly different color (e.g. if normal text is black, these last characters could be grey instead). |
If sha256 won't be used to identify torrents, then what's the point in it? After all, trackers will be able to take into account the same number of torrents as in the first BitTorrent version (in fact, even less, because some of the identifiers are occupied by real sha1 hashes of torrents of the first version). What is the benefit of calculating a more complex hash sum if we use its truncated value only? We only expend more energy and create confusion. |
I still am not sure that this is some kind of stable concept of the protocol, and not some temporary phenomenon. I would prefer to treat qBittorrent Torrent ID as an internal identifier after all, so that as few things as possible depend on its real value, and we would not have to change a bunch of code again when this changes in the protocol. But if you (and not just you) insist that it has a direct correspondence with what we have in the current draft of the protocol, well, please, let's show it in the UI as Torrent ID. |
I don't see why, I think the spec is quite clear. But I understand that you don't think it is as finalized as we'd like it to be.
These questions are somewhat confusing since you make a distinction between the "reduced sha256" and the "Torrent ID". I will assume the point of view of the BEP when answering, as in #15097 (comment).
From our discussion in the previous comments, I think this is fine as it is in this PR: For v1 torrents, v2 hash displays as Use case: users often want to easily check info hashes/identifiers to compare against other resources (e.g. a hash on a webpage).
I'm not sure what you mean by "What options should we provide in case of single/multiple torrents of same version". The only change I would make to this PR regarding the copying from the context menu is the one mentioned in my review: #15097 (comment)
No comment from me on this one.
Following the same logic as for my answer to 1.: For v1 torrents, v2 hash displays as |
@FranciscoPombal
👍
👍
👍
What you suggest is the simplest in essence. But is this what the user expects? You didn't give an example of how you would use it. |
PR is updated. Please review it again. I think we should start with it and wait feedback from users.
|
Copy Infohash v1/v2 isn't hidden when unavailable in WebUI like in the GUI. /off topic |
Apparently, my nature does not consider it an integral part of the application (but only some external application), so I never care about it... I would prefer never deal with it.
It definitely makes sense 👍 |
Done!
Honestly, nothing simple came to my mind. I'm not even sure that it behaves in the same way in the Web UI. Well, I'll leave that to those who know more about it. |
@Chocobo1 |
Yes.
IMO better start with something than leaving it unorganized. |
I agree. |
Hey, I thought I had posted this piece of feedback before, so here goes. It's nothing that would have affected the merge anyway, so don't worry about that.
👍 I agree with preserving the existing parameter for the identifier instead of the V1 hash. This is exactly the same logic as the BEP - the
I don't think we do. We just need to show exactly the same thing in both the General tab and the add torrent dialog. If people request the ID to be shown in the dialog later we can add it later.
Ah, I see. I did not know you could copy such a list from several torrents. Then in the case of multiple torrents, I think it only makes sense to copy the ID (the other options should be greyed out). |
No description provided.