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")
|
@Define("videos")
|
||||||
public List<Map<String, String>> getVideoInfoList() {
|
public List<AssociativeScriptObject> getVideoInfoList() {
|
||||||
return getMediaInfo().snapshot().get(StreamKind.Video);
|
return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Video));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Define("audios")
|
@Define("audios")
|
||||||
public List<Map<String, String>> getAudioInfoList() {
|
public List<AssociativeScriptObject> getAudioInfoList() {
|
||||||
return getMediaInfo().snapshot().get(StreamKind.Audio);
|
return createMapBindingsList(getMediaInfo().snapshot().get(StreamKind.Audio));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Define("texts")
|
@Define("texts")
|
||||||
public List<Map<String, String>> getTextInfoList() {
|
public List<AssociativeScriptObject> getTextInfoList() {
|
||||||
return getMediaInfo().snapshot().get(StreamKind.Text);
|
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 {
|
private String crc32(File file) throws IOException, InterruptedException {
|
||||||
// try to get checksum from cache
|
// try to get checksum from cache
|
||||||
Cache cache = Cache.getCache("checksum");
|
Cache cache = Cache.getCache("checksum");
|
||||||
|
Loading…
Reference in New Issue
Block a user