mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06: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:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user