* unify episode airdate and movie release date with {d} binding

This commit is contained in:
Reinhard Pointner 2012-11-04 01:17:58 +00:00
parent 22abbab6ac
commit 9841e45f0e
2 changed files with 15 additions and 1 deletions

View File

@ -123,6 +123,20 @@ public class MediaBindingBean {
}
@Define("d")
public Object getReleaseDate() {
if (infoObject instanceof Episode) {
return getEpisode().airdate();
}
if (infoObject instanceof Movie) {
return getMetaInfo().getProperty("released");
}
// no date info for the model
return null;
}
@Define("airdate")
public Date airdate() {
return getEpisode().airdate();

View File

@ -2,4 +2,4 @@
parameter.exclude: ^StreamKind|Count$
# preview expressions (keys are tagged so they can be sorted alphabetically)
expressions: n,y,s,e,t,airdate,startdate,absolute,special,imdbid,episode,sxe,s00e00,movie,vc,ac,cf,vf,af,resolution,hpi,ws,sdhd,source,group,crc32,fn,ext,file,pi,pn,lang,actors,director,collection,genres,certification,rating,dim,info.runtime,info.status,imdb.rating,imdb.votes,media.title,media.durationString,media.overallBitRateString,video.codecID,video.frameRate,video.displayAspectRatioString,video.height,video.scanType,audio.format,audio.bitRateString,audio.language,text.codecInfo,text.language
expressions: n,y,s,e,t,d,startdate,absolute,special,imdbid,episode,sxe,s00e00,movie,vc,ac,cf,vf,af,resolution,hpi,ws,sdhd,source,group,crc32,fn,ext,file,pi,pn,lang,actors,director,collection,genres,certification,rating,dim,info.runtime,info.status,imdb.rating,imdb.votes,media.title,media.durationString,media.overallBitRateString,video.codecID,video.frameRate,video.displayAspectRatioString,video.height,video.scanType,audio.format,audio.bitRateString,audio.language,text.codecInfo,text.language