mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-25 09:18:51 -05:00
* make Match button "Smart" again so it'll suggest fetching data if names is list empty... i guess people have been doing it wrong too long to change that now...
This commit is contained in:
parent
b2b29b2584
commit
e2e4ee240e
@ -40,11 +40,15 @@ class MatchAction extends AbstractAction {
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
if (model.names().isEmpty() || model.files().isEmpty()) {
|
||||
if (model.files().isEmpty()) {
|
||||
UILogger.info("Nothing to match. Please add some files and fetch data first.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (model.names().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
BackgroundMatcher backgroundMatcher = new BackgroundMatcher(model, EpisodeMetrics.defaultSequence(true));
|
||||
backgroundMatcher.execute();
|
||||
|
||||
|
@ -12,6 +12,7 @@ import java.awt.Cursor;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
@ -204,6 +205,17 @@ public class RenamePanel extends JComponent {
|
||||
filesList.getButtonPanel().add(createImageButton(clearFilesAction), "gap 0");
|
||||
filesList.getButtonPanel().add(createImageButton(openHistoryAction), "gap indent");
|
||||
|
||||
matchButton.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// show popup on actionPerformed only when names list is empty
|
||||
if (renameModel.files().size() > 0 && renameModel.names().isEmpty()) {
|
||||
fetchPopupAction.actionPerformed(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// reveal file location on double click
|
||||
filesList.getListComponent().addMouseListener(new MouseAdapter() {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user