1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 22:35:04 -05:00

+ added {duration} and {minutes} bindings

This commit is contained in:
Reinhard Pointner 2013-12-19 06:21:45 +00:00
parent ec818a921d
commit f0616effc3

View File

@ -521,6 +521,16 @@ public class MediaBindingBean {
return WebServices.TheTVDB.getEpisodeList(WebServices.TheTVDB.search(getEpisode().getSeriesName()).get(0), SortOrder.Airdate, Locale.ENGLISH); return WebServices.TheTVDB.getEpisodeList(WebServices.TheTVDB.search(getEpisode().getSeriesName()).get(0), SortOrder.Airdate, Locale.ENGLISH);
} }
@Define("duration")
public Integer getDuration() {
return new Integer(getMediaInfo(StreamKind.General, 0, "Duration"));
}
@Define("minutes")
public Integer getDurationInMinutes() {
return Math.round(getDuration() / 60000f);
}
@Define("media") @Define("media")
public AssociativeScriptObject getGeneralMediaInfo() { public AssociativeScriptObject getGeneralMediaInfo() {
return createMapBindings(getMediaInfo().snapshot(StreamKind.General, 0)); return createMapBindings(getMediaInfo().snapshot(StreamKind.General, 0));