Add option to only extract specific labels
Add UI element for a comma-separated list of labels to extract by. Should work with both Label and LabelPlus plugins. If no filter is specified, it will extract anything.
This commit is contained in:
@@ -66,6 +66,23 @@ Deluge.ux.preferences.SimpleExtractorPage = Ext.extend(Ext.Panel, {
|
||||
boxLabel: _('Extract torrent in-place')
|
||||
});
|
||||
|
||||
fieldset2 = this.form.add({
|
||||
xtype: 'fieldset',
|
||||
border: false,
|
||||
title: '',
|
||||
autoHeight: true,
|
||||
labelAlign: 'top',
|
||||
labelWidth: 80,
|
||||
defaultType: 'textfield'
|
||||
});
|
||||
|
||||
this.extract_labels = fieldset.add({
|
||||
fieldLabel: _('Label Filter:'),
|
||||
labelSeparator : '',
|
||||
name: 'extract_labels',
|
||||
width: '97%'
|
||||
});
|
||||
|
||||
this.on('show', this.updateConfig, this);
|
||||
},
|
||||
|
||||
@@ -76,6 +93,7 @@ Deluge.ux.preferences.SimpleExtractorPage = Ext.extend(Ext.Panel, {
|
||||
config['extract_path'] = this.extract_path.getValue();
|
||||
config['use_name_folder'] = this.use_name_folder.getValue();
|
||||
config['in_place_extraction'] = this.in_place_extraction.getValue();
|
||||
config['extract_labels'] = this.extract_labels.getValue();
|
||||
|
||||
deluge.client.simpleextractor.set_config(config);
|
||||
},
|
||||
@@ -90,6 +108,7 @@ Deluge.ux.preferences.SimpleExtractorPage = Ext.extend(Ext.Panel, {
|
||||
this.extract_path.setValue(config['extract_path']);
|
||||
this.use_name_folder.setValue(config['use_name_folder']);
|
||||
this.in_place_extraction.setValue(config['in_place_extraction']);
|
||||
this.extract_labels.setValue(config['extract_labels']);
|
||||
},
|
||||
scope: this
|
||||
});
|
||||
|
||||
@@ -100,7 +100,51 @@
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_labels">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Enter labels to extract (comma-separated, leave blank for all)</property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry_labels">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Enter one or more labels to extract, separated by commas. Leave to extract any archive found.</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label1">
|
||||
|
||||
Reference in New Issue
Block a user