- Moved "download in sequential order" from Torrent properties to right click menu in transfer list (it makes more sense this way)

- Do not save sequential mode status to hard disk because libtorrent is already taking care of this
This commit is contained in:
Christophe Dumez
2009-11-19 12:45:11 +00:00
parent 81412584e1
commit e8fba3e630
6 changed files with 36 additions and 40 deletions

View File

@@ -203,8 +203,6 @@ public:
}
data["url_seeds"] = url_seeds;
}
// Sequential download
data["sequential"] = h.is_sequential_download();
// Save data
all_data[h.hash()] = data;
settings.setValue("torrents", all_data);
@@ -288,15 +286,6 @@ public:
settings.setValue("torrents", all_data);
}
static void saveSequentialStatus(QTorrentHandle h) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent-resume"));
QHash<QString, QVariant> all_data = settings.value("torrents", QHash<QString, QVariant>()).toHash();
QHash<QString, QVariant> data = all_data[h.hash()].toHash();
data["sequential"] = h.is_sequential_download();
all_data[h.hash()] = data;
settings.setValue("torrents", all_data);
}
// Getters
static QHash<QString, QVariant> getTrackers(QString hash) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent-resume"));
@@ -359,12 +348,5 @@ public:
return data["magnet_uri"].toString();
}
static bool isSequentialDownload(QString hash) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent-resume"));
QHash<QString, QVariant> all_data = settings.value("torrents", QHash<QString, QVariant>()).toHash();
QHash<QString, QVariant> data = all_data[hash].toHash();
return data["sequential"].toBool();
}
};
#endif // TORRENTPERSISTENTDATA_H