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
Emtpy fields in General tab #11233
Comments
Also ping @arvidn. qBittorrent/src/base/bittorrent/session.cpp Lines 1940 to 1945 in 12c127b
AFAIK there is no easy way to put back the "creation date" field and comment field to libtorrent, I hope you don't suggest we need to track these fields ourselves. :( |
@Chocobo1, as far as I understand this problem, we need data from both places (1. metadata from fastresume since it contains modified data and 2. original torrent file since it contains some data that isn't included in fastresume), but we can only use one of them, right?
|
@Chocobo1, @sledgehammer999, shouldn't we fix this issue until v4.2 final release? |
I was intending to open a bug on libtorrent. Quick thoughts:
|
@sledgehammer999, sorry, I'm not sure you (or me?) understand the problem correctly...
Of course we can ask @arvidn to fix libtorrent (if he admits it's a problem) to store all changed data consistently (like, e.g., file names: torrent metadata contains original names and fastresume data changed ones). Then we can just use our previous way (load .torrent + .fastresume). |
... or try to fix it at qBittorrent level. |
This became a problem after we switched to saving the info object into the fastresume. A switch to faciliatate a fix to another problem: When user deleted all trackers, the relevant field in the fastresume is empty. But during loading libtorrent thinks that it is uninitialized and loads the trackers from the torrent_info blob (which we provided separately) thus defeating the users's deletion. |
Personally I would like libtorrent to handle it. IMO it doesn't make sense that
The first idea came to my mind is that when loading the initial (first-time encounter) .torrent file, we track/store comment string ourselves into fastresume file (using "qbt-comment" key). This way we can still follow the "no .torrent file" trend (if this trend make sense). |
It's possible to include the (I haven't read through this whole thread, so I may be missing some important detail). My understanding is that new way of using |
@arvidn I haven't looked at master. But here are the 2 separate problems that indirectly link to each other:
Personally I would like to see a fix for number 1 in RC_1_2? Maybe introduce |
I think it isn't necessary (unless empty list isn't available to be stored in bencoded form). |
It's different from RC_1_2? |
Yes. .torrent file has some other fields which should be restored as well. |
From my limited knowledge, I don't think you can differentiate between empty/uninitialized in bencoded form.
Are you sure? Won't this break ABI/API backwards compatibility in the RC_1_2 branch? (That's why I said to introduce a new struct). |
I meant only that you don't need any pseudo values in fastresume.
Some list can exist, but be empty, or not exist at all. Isn't that so? But it seems that we do not need it at all... |
It seems like the second way (restoring torrent without .torrent file) can be fixed in libtorrent without breaking ABI. |
Even if storing unchanged trackers in fastresume isn't optimal it's not a problem. As I said above it is possible to handle it correctly:
|
This is supposed to work in I will review this logic to make sure it works as it's supposed to, especially |
oh, right. But the actual issue isn't the trackers, it's that everything else from the .torrent, not part of the |
it would be easy to store and load "comment", "created by" and "creation date" in the resume data, in a backwards compatible way in |
(I may be mistaken) How are we supposed to know to set or not the override flag, when the user hasn't changed the trackers at all? IIRC in that case no trackers' list is saved in the fastresume and the one provided by the .torrent file should be used. |
I think this should be set by libtorrent. If I understand correctly, it would be safe for |
@sledgehammer999 I think this would solve the resume data issue in this ticket, and also comment, creation date and created-by. Would you mind giving it a try? |
@arvidn, if you want to provide convenient/reliable way of restoring torrents using only fastresume data you need to store all the torrent metadata (except maybe the fields that aren't handled by libtorrent at all). |
yeah, I think these were the only missing ones. web seeds and trackers are already saved |
Fixed by arvidn/libtorrent#4112 |
Please provide the following information
qBittorrent version and Operating System
qbt master branch
If on linux, libtorrent-rasterbar and Qt version
libtorrent RC_1_2 branch
What is the problem
The "creation date" field and comment field under General tab are empty.
What is the expected behavior
Not empty.
Steps to reproduce
Extra info(if any)
I suspect this is due to the change in #11104. The 2 fields are not saved to fastresume file and the new loading mechanism doesn't load from .torrent anymore, hence the fields are lost.
Screenshot: #11406 (comment)
The text was updated successfully, but these errors were encountered: