From 9bec33c20b56ab872ce50763512631768160c082 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 27 Jul 2017 14:59:32 +0800 Subject: [PATCH] // progressive by default if ScanType is undefined --- source/net/filebot/format/MediaBindingBean.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index 461cf674..4a8ea6ef 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -380,8 +380,11 @@ public class MediaBindingBean { String height = getMediaInfo(StreamKind.Video, 0, "Height"); String scanType = getMediaInfo(StreamKind.Video, 0, "ScanType"); + // progressive by default if ScanType is undefined + String p = scanType.codePoints().map(Character::toLowerCase).mapToObj(Character::toChars).map(String::valueOf).findFirst().orElse("p"); + // e.g. 720p - return height + Character.toLowerCase(scanType.charAt(0)); + return height + p; } @Define("af")