From 70ca7b9484eeb50cfa15df6ae4834145159e7973 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 8 Nov 2016 21:58:25 +0800 Subject: [PATCH] Binding "General[0][Encoded_Date]": undefined => normal if Encoded_Date is undefined => ignore --- source/net/filebot/similarity/EpisodeMetrics.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/similarity/EpisodeMetrics.java b/source/net/filebot/similarity/EpisodeMetrics.java index 0a8eeb07..a2ce2045 100644 --- a/source/net/filebot/similarity/EpisodeMetrics.java +++ b/source/net/filebot/similarity/EpisodeMetrics.java @@ -28,6 +28,7 @@ import java.util.stream.Stream; import com.ibm.icu.text.Transliterator; +import net.filebot.format.BindingException; import net.filebot.format.MediaBindingBean; import net.filebot.media.SmartSeasonEpisodeMatcher; import net.filebot.similarity.SeasonEpisodeMatcher.SxE; @@ -549,8 +550,10 @@ public enum EpisodeMetrics implements SimilarityMetric { if (VIDEO_FILES.accept(file) && file.length() > ONE_MEGABYTE) { try { return new MediaBindingBean(file, file).getEncodedDate().getTimeStamp(); + } catch (BindingException e) { + debug.finest(e::getMessage); // Binding "General[0][Encoded_Date]": undefined => normal if Encoded_Date is undefined => ignore } catch (Exception e) { - debug.warning(format("Failed to read media encoding date: %s", e.getMessage())); + debug.warning("Failed to read media encoding date: " + e.getMessage()); } }