mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-09 14:27:56 +00:00
- Display URL seeds in torrent properties
This commit is contained in:
parent
92a9d04568
commit
6a028c9efd
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>756</width>
|
<width>756</width>
|
||||||
<height>291</height>
|
<height>333</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -466,23 +466,6 @@
|
|||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_12">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<strikeout>false</strikeout>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Trackers:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="_21">
|
<layout class="QVBoxLayout" name="_21">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -733,8 +716,144 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="page_3"/>
|
<widget class="QWidget" name="page_3">
|
||||||
<widget class="QWidget" name="page_4"/>
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="listWebSeeds"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="_19">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="deleteWS_button">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="icons.qrc">
|
||||||
|
<normaloff>:/Icons/oxygen/list-remove.png</normaloff>:/Icons/oxygen/list-remove.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="addWS_button">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="icons.qrc">
|
||||||
|
<normaloff>:/Icons/oxygen/list-add.png</normaloff>:/Icons/oxygen/list-add.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_4">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QTreeView" name="filesList">
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::AllEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="_6">
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="collapseAllButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Collapse all</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="expandAllButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Expand all</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -135,6 +135,8 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
|
|||||||
incrementalDownload->setChecked(TorrentPersistentData::isSequentialDownload(h.hash()));
|
incrementalDownload->setChecked(TorrentPersistentData::isSequentialDownload(h.hash()));
|
||||||
// Trackers
|
// Trackers
|
||||||
loadTrackers();
|
loadTrackers();
|
||||||
|
// URL seeds
|
||||||
|
loadUrlSeeds();
|
||||||
// downloaded pieces updater
|
// downloaded pieces updater
|
||||||
progressBarUpdater = new RealProgressBarThread(progressBar, h);
|
progressBarUpdater = new RealProgressBarThread(progressBar, h);
|
||||||
progressBarUpdater->start();
|
progressBarUpdater->start();
|
||||||
@ -213,6 +215,27 @@ void PropertiesWidget::loadTrackers() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertiesWidget::loadUrlSeeds(){
|
||||||
|
QStringList already_added;
|
||||||
|
listWebSeeds->clear();
|
||||||
|
QVariantList url_seeds = TorrentPersistentData::getUrlSeeds(h.hash());
|
||||||
|
foreach(const QVariant &var_url_seed, url_seeds){
|
||||||
|
QString url_seed = var_url_seed.toString();
|
||||||
|
if(!url_seed.isEmpty()) {
|
||||||
|
new QListWidgetItem(url_seed, listWebSeeds);
|
||||||
|
already_added << url_seed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Load the hard-coded url seeds
|
||||||
|
QStringList hc_seeds = h.url_seeds();
|
||||||
|
// Add hard coded url seeds
|
||||||
|
foreach(const QString &hc_seed, hc_seeds){
|
||||||
|
if(!already_added.contains(hc_seed)){
|
||||||
|
new QListWidgetItem(hc_seed, listWebSeeds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Tab buttons */
|
/* Tab buttons */
|
||||||
QPushButton* PropertiesWidget::getButtonFromIndex(int index) {
|
QPushButton* PropertiesWidget::getButtonFromIndex(int index) {
|
||||||
switch(index) {
|
switch(index) {
|
||||||
|
@ -66,6 +66,7 @@ protected slots:
|
|||||||
void loadDynamicData();
|
void loadDynamicData();
|
||||||
void setIncrementalDownload(int checkboxState);
|
void setIncrementalDownload(int checkboxState);
|
||||||
void loadTrackers();
|
void loadTrackers();
|
||||||
|
void loadUrlSeeds();
|
||||||
void on_main_infos_button_clicked();
|
void on_main_infos_button_clicked();
|
||||||
void on_trackers_button_clicked();
|
void on_trackers_button_clicked();
|
||||||
void on_url_seeds_button_clicked();
|
void on_url_seeds_button_clicked();
|
||||||
|
Loading…
Reference in New Issue
Block a user