From 1b942fcd1509117f8114cea65454a1a96236ef5e Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 2 Nov 2011 14:48:23 +0000 Subject: [PATCH] * added SD/HD binding --- .../net/sourceforge/filebot/format/MediaBindingBean.java | 9 +++++++++ .../filebot/ui/rename/BindingDialog.properties | 2 +- website/naming.html | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/format/MediaBindingBean.java b/source/net/sourceforge/filebot/format/MediaBindingBean.java index af510894..c02485b9 100644 --- a/source/net/sourceforge/filebot/format/MediaBindingBean.java +++ b/source/net/sourceforge/filebot/format/MediaBindingBean.java @@ -194,6 +194,15 @@ public class MediaBindingBean { } + @Define("sdhd") + public String getVideoDefinitionCategory() { + String height = getMediaInfo(StreamKind.Video, 0, "Height"); + + // SD (less than 720 lines) or HD (more than 720 lines) + return Integer.parseInt(height) < 720 ? "SD" : "HD"; + } + + @Define("crc32") public String getCRC32() throws IOException, InterruptedException { // use inferred media file diff --git a/source/net/sourceforge/filebot/ui/rename/BindingDialog.properties b/source/net/sourceforge/filebot/ui/rename/BindingDialog.properties index 1a2867b7..20c42884 100644 --- a/source/net/sourceforge/filebot/ui/rename/BindingDialog.properties +++ b/source/net/sourceforge/filebot/ui/rename/BindingDialog.properties @@ -2,4 +2,4 @@ parameter.exclude: ^StreamKind|Count$ # preview expressions (keys are tagged so they can be sorted alphabetically) -expressions: n,y,s,e,t,airdate,startdate,absolute,special,imdb,episode,movie,vc,ac,cf,vf,af,resolution,source,group,crc32,fn,ext,file,pi,pn,media.title,media.durationString,media.overallBitRateString,video.codecID,video.frameRate,video.displayAspectRatioString,video.height,video.scanType,audio.format,audio.bitRateString,audio.language,text.codecInfo,text.language +expressions: n,y,s,e,t,airdate,startdate,absolute,special,imdb,episode,movie,vc,ac,cf,vf,af,resolution,sdhd,source,group,crc32,fn,ext,file,pi,pn,media.title,media.durationString,media.overallBitRateString,video.codecID,video.frameRate,video.displayAspectRatioString,video.height,video.scanType,audio.format,audio.bitRateString,audio.language,text.codecInfo,text.language diff --git a/website/naming.html b/website/naming.html index 516f3e3e..06fff963 100644 --- a/website/naming.html +++ b/website/naming.html @@ -189,6 +189,11 @@ video size 1280x720 + + sdhd + SD/HD video + SD or HD + source source medium