mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 03:28:41 -07:00
- Rewrited torrent resume code to make it cleaner and more generic
* magnet URI support should be easy to implement now Warning: Since a lot of code was rewrited, some bugs may have been introduced
This commit is contained in:
parent
360a327d7d
commit
2742a54d6e
11 changed files with 1879 additions and 1656 deletions
|
@ -241,6 +241,11 @@ torrent_status::state_t QTorrentHandle::state() const {
|
|||
return h.status().state;
|
||||
}
|
||||
|
||||
std::vector<int> QTorrentHandle::file_priorities() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.file_priorities();
|
||||
}
|
||||
|
||||
QString QTorrentHandle::creator() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return misc::toQString(h.get_torrent_info().creator());
|
||||
|
@ -325,6 +330,11 @@ int QTorrentHandle::active_time() const {
|
|||
return h.status().active_time;
|
||||
}
|
||||
|
||||
bool QTorrentHandle::is_sequential_download() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.is_sequential_download();
|
||||
}
|
||||
|
||||
//
|
||||
// Setters
|
||||
//
|
||||
|
@ -428,6 +438,11 @@ void QTorrentHandle::move_storage(QString new_path) const {
|
|||
h.move_storage(new_path.toLocal8Bit().data());
|
||||
}
|
||||
|
||||
void QTorrentHandle::file_priority(int index, int priority) const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
h.file_priority(index, priority);
|
||||
}
|
||||
|
||||
//
|
||||
// Operators
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue