1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

* use ASO bindings for the multi-stream objects to make it easier to use

This commit is contained in:
Reinhard Pointner 2013-07-13 17:13:07 +00:00
parent ccd96ae5be
commit 483d5d3e76

View File

@ -578,20 +578,20 @@ public class MediaBindingBean {
@Define("videos")
public List<Map<String, String>> getVideoInfoList() {
return getMediaInfo().snapshot().get(StreamKind.Video);
public List<AssociativeScriptObject> getVideoInfoList() {
return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Video));
}
@Define("audios")
public List<Map<String, String>> getAudioInfoList() {
return getMediaInfo().snapshot().get(StreamKind.Audio);
public List<AssociativeScriptObject> getAudioInfoList() {
return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Audio));
}
@Define("texts")
public List<Map<String, String>> getTextInfoList() {
return getMediaInfo().snapshot().get(StreamKind.Text);
public List<AssociativeScriptObject> getTextInfoList() {
return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Text));
}
@ -834,6 +834,15 @@ public class MediaBindingBean {
}
private List<AssociativeScriptObject> createMapBindingsList(List<Map<String, String>> mapList) {
List<AssociativeScriptObject> bindings = new ArrayList<AssociativeScriptObject>();
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");