Closed fuyukaidesu closed 9 years ago
Hey, this looks pretty good! I'm assuming this adds the ability to track state changes between downloading, seeding, etc., right?
Yes.
Perfect! It looks good on my end. Maybe wait for one more dev? Also, once this is merged we can close #81
Sidenote: I should be on tomorrow to do some work.
the logs are annoying & you should probably use gt::Log
random crash:
gtorrent-gtk: /usr/include/boost/smart_ptr/intrusive_ptr.hpp:162: T *boost::intrusive_ptr<const libtorrent::torrent_info>::operator->() const [T = const libtorrent::torrent_info]: Assertion 'px != 0' failed.
i think what i did was add a magnet, let it download, remove it, then add it again
Crash is from gtk, and is due to the status box trying to retrieve the number of pieces on a magnet that has no metadata.
Mainly implements events. You can set up a callback std::function that is called every time the object change states. Also changed the getFileSizeString method to support more sizeprefixes (Up to YB) UI default parameters (colors) were moved outside of core.
[spoiler] For some reason the oldstate argument maybe uninitialized, and the old state may also be unrelated to a previous new state and sometimes, libtorrent changes the state a few times at once, but that's a libtorrent issue. For example, in a call, you may have oldstate = 31231, new state = 7
or in two consecutive calls oldstate = 0 new state = 4 oldstate = 0 new state = 5
And most of the time it's a mix of these two. [/spoiler]