Binding "General[0][Encoded_Date]": undefined => normal if Encoded_Date is undefined => ignore

This commit is contained in:
Reinhard Pointner 2016-11-08 21:58:25 +08:00
parent 8ec6282266
commit 70ca7b9484
1 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import java.util.stream.Stream;
import com.ibm.icu.text.Transliterator; import com.ibm.icu.text.Transliterator;
import net.filebot.format.BindingException;
import net.filebot.format.MediaBindingBean; import net.filebot.format.MediaBindingBean;
import net.filebot.media.SmartSeasonEpisodeMatcher; import net.filebot.media.SmartSeasonEpisodeMatcher;
import net.filebot.similarity.SeasonEpisodeMatcher.SxE; import net.filebot.similarity.SeasonEpisodeMatcher.SxE;
@ -549,8 +550,10 @@ public enum EpisodeMetrics implements SimilarityMetric {
if (VIDEO_FILES.accept(file) && file.length() > ONE_MEGABYTE) { if (VIDEO_FILES.accept(file) && file.length() > ONE_MEGABYTE) {
try { try {
return new MediaBindingBean(file, file).getEncodedDate().getTimeStamp(); 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) { } 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());
} }
} }