From 483d5d3e76fe739df8eadc55125cf6d591cef823 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 13 Jul 2013 17:13:07 +0000 Subject: [PATCH] * use ASO bindings for the multi-stream objects to make it easier to use --- .../filebot/format/MediaBindingBean.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/source/net/sourceforge/filebot/format/MediaBindingBean.java b/source/net/sourceforge/filebot/format/MediaBindingBean.java index cd9be181..e5c11b19 100644 --- a/source/net/sourceforge/filebot/format/MediaBindingBean.java +++ b/source/net/sourceforge/filebot/format/MediaBindingBean.java @@ -578,20 +578,20 @@ public class MediaBindingBean { @Define("videos") - public List> getVideoInfoList() { - return getMediaInfo().snapshot().get(StreamKind.Video); + public List getVideoInfoList() { + return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Video)); } @Define("audios") - public List> getAudioInfoList() { - return getMediaInfo().snapshot().get(StreamKind.Audio); + public List getAudioInfoList() { + return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Audio)); } @Define("texts") - public List> getTextInfoList() { - return getMediaInfo().snapshot().get(StreamKind.Text); + public List getTextInfoList() { + return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Text)); } @@ -834,6 +834,15 @@ public class MediaBindingBean { } + private List createMapBindingsList(List> mapList) { + List bindings = new ArrayList(); + for (Map it : mapList) { + bindings.add(createMapBindings(it)); + } + return bindings; + } + + private String crc32(File file) throws IOException, InterruptedException { // try to get checksum from cache Cache cache = Cache.getCache("checksum");