From 7663977c9ac099a61390ea1238c29634137f4437 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 26 Mar 2017 21:17:26 +0800 Subject: [PATCH] Support context bindings when testing with sample data --- source/net/filebot/ui/rename/FormatDialog.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/ui/rename/FormatDialog.java b/source/net/filebot/ui/rename/FormatDialog.java index df4b3281..6592a5b9 100644 --- a/source/net/filebot/ui/rename/FormatDialog.java +++ b/source/net/filebot/ui/rename/FormatDialog.java @@ -424,6 +424,7 @@ public class FormatDialog extends JDialog { protected MediaBindingBean restoreSample(Mode mode) { Object info = null; File media = null; + Map context = null; try { // restore sample from user preferences @@ -443,9 +444,10 @@ public class FormatDialog extends JDialog { if (path != null && !path.isEmpty()) { media = new File(path); + context = singletonMap(media, info); } - return new MediaBindingBean(info, media); + return new MediaBindingBean(info, media, context); } private ExecutorService createExecutor() {