From 91031896fd24d18308b6e0054832ebdce500e95f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 26 Oct 2014 14:45:37 +0000 Subject: [PATCH] * fix Mac Sandbox issues that prevents download of subtitles --- .../net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java | 7 +++++++ source/net/filebot/ui/subtitle/SubtitleDropTarget.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java b/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java index 0eb20674..215c0d0b 100644 --- a/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java +++ b/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java @@ -2,6 +2,7 @@ package net.filebot.ui.subtitle; import static javax.swing.BorderFactory.*; import static javax.swing.JOptionPane.*; +import static net.filebot.Settings.*; import static net.filebot.subtitle.SubtitleUtilities.*; import static net.filebot.util.FileUtilities.*; import static net.filebot.util.ui.SwingUI.*; @@ -59,6 +60,7 @@ import javax.swing.table.DefaultTableCellRenderer; import net.filebot.Analytics; import net.filebot.ResourceManager; +import net.filebot.mac.DropToUnlock; import net.filebot.similarity.EpisodeMetrics; import net.filebot.similarity.MetricCascade; import net.filebot.similarity.SimilarityMetric; @@ -266,6 +268,11 @@ class SubtitleAutoMatchDialog extends JDialog { final SubtitleMappingTableModel mappingModel = (SubtitleMappingTableModel) subtitleMappingTable.getModel(); + // make sure we have access to the parent folder structure, not just the dropped file + if (isMacSandbox()) { + DropToUnlock.showUnlockFoldersDialog(getWindow(evt.getSource()), mappingModel.getVideoFiles()); + } + // collect the subtitles that will be fetched List downloadQueue = new ArrayList(); diff --git a/source/net/filebot/ui/subtitle/SubtitleDropTarget.java b/source/net/filebot/ui/subtitle/SubtitleDropTarget.java index 65ab655a..d08c3421 100644 --- a/source/net/filebot/ui/subtitle/SubtitleDropTarget.java +++ b/source/net/filebot/ui/subtitle/SubtitleDropTarget.java @@ -154,7 +154,7 @@ abstract class SubtitleDropTarget extends JButton { @Override protected boolean handleDrop(List input) { if (getQueryLanguage() == null) { - UILogger.info("Please select a specific subtitle language."); + UILogger.info("Please select your preferred subtitle language."); return false; }