mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-16 06:15:02 -05:00
* use ASO bindings for the multi-stream objects to make it easier to use
This commit is contained in:
parent
ccd96ae5be
commit
483d5d3e76
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user