+ added {duration} and {minutes} bindings

This commit is contained in:
Reinhard Pointner 2013-12-19 06:21:45 +00:00
parent ec818a921d
commit f0616effc3
1 changed files with 10 additions and 0 deletions

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));