mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-17 23:05:03 -05:00
Improved support for resolution/width/height bindings (and support for image files)
This commit is contained in:
parent
a7c39e81dd
commit
cc34001f0f
@ -444,11 +444,11 @@ public class MediaBindingBean {
|
|||||||
|
|
||||||
@Define("dim")
|
@Define("dim")
|
||||||
public List<Integer> getDimension() {
|
public List<Integer> getDimension() {
|
||||||
// collect Width and Height as Integer List
|
|
||||||
return Stream.of("Width", "Height").map(p -> {
|
|
||||||
// collect value from Video Stream 0 or Image Stream 0
|
// collect value from Video Stream 0 or Image Stream 0
|
||||||
return Stream.of(StreamKind.Video, StreamKind.Image).map(k -> getMediaInfo().get(k, 0, p)).filter(s -> s.length() > 0).map(Integer::new).findFirst().orElse(0);
|
return Stream.of(StreamKind.Video, StreamKind.Image).map(k -> {
|
||||||
}).collect(toList());
|
// collect Width and Height as Integer List
|
||||||
|
return Stream.of("Width", "Height").map(p -> getMediaInfo().get(k, 0, p)).filter(s -> s.length() > 0).map(Integer::new).collect(toList());
|
||||||
|
}).filter(d -> d.size() == 2).findFirst().orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Define("width")
|
@Define("width")
|
||||||
|
Loading…
Reference in New Issue
Block a user