* update docs for {info} binding movie/series metadata binding

This commit is contained in:
Reinhard Pointner 2012-02-09 13:42:14 +00:00
parent d93b58cca9
commit 517fa36038
5 changed files with 49 additions and 3 deletions

View File

@ -304,7 +304,7 @@ public class MediaBindingBean {
}
@Define("meta")
@Define("info")
public synchronized Object getMetaInfo() throws Exception {
if (metaInfo == null) {
if (infoObject instanceof Episode)

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,imdb,episode,sxe,s00e00,movie,vc,ac,cf,vf,af,resolution,ws,sdhd,source,group,crc32,fn,ext,file,pi,pn,lang,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,airdate,startdate,absolute,special,imdb,episode,sxe,s00e00,movie,vc,ac,cf,vf,af,resolution,ws,sdhd,source,group,crc32,fn,ext,file,pi,pn,lang,info,info.actors,info.director,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

View File

@ -377,6 +377,26 @@ public class TMDbClient implements MovieIdentificationService {
}
public String getDirector() {
for (Person person : cast) {
if (person.isDirector())
return person.getName();
}
return null;
}
public List<String> getActors() {
List<String> actors = new ArrayList<String>();
for (Person person : cast) {
if (person.isActor()) {
actors.add(person.getName());
}
}
return actors;
}
public List<Artwork> getImages() {
return unmodifiableList(asList(images));
}
@ -506,6 +526,11 @@ public class TMDbClient implements MovieIdentificationService {
}
public String getCharacter() {
return get(PersonProperty.character);
}
public String getJob() {
return get(PersonProperty.job);
}
@ -525,6 +550,16 @@ public class TMDbClient implements MovieIdentificationService {
}
public boolean isActor() {
return "Actor".equals(getJob());
}
public boolean isDirector() {
return "Director".equals(getJob());
}
@Override
public String toString() {
return fields.toString();

View File

@ -23,7 +23,7 @@ public class TMDbClientTest {
List<Movie> result = tmdb.searchMovie("Serenity", Locale.CHINESE);
Movie movie = result.get(0);
assertEquals("冲出���", movie.getName());
assertEquals("冲出宁静号", movie.getName());
assertEquals(2005, movie.getYear());
assertEquals(379786, movie.getImdbId());
}

View File

@ -278,6 +278,11 @@
<td>detect subtitle language</td>
<td>eng</td>
</tr>
<tr>
<td>info</td>
<td>TheTVDB / TheMovieDB metadata</td>
<td>&lt;any metadata&gt;</td>
</tr>
<tr>
<td>file</td>
<td>file object</td>
@ -339,6 +344,12 @@
<p>
<code><span class="method">replacePart</span>(<span class="string">replacement</span> = <span class="string">""</span>)</code>Replace part identifier (e.g. "Today Is the Day (1)" -> "Today Is the Day, Part 1").
</p>
<p>
<code><span class="method">ascii</span>()</code>Convert Unicode to ASCII. (e.g. "Österreich" -> "Osterreich" or "カタカナ" -> "katakana").
</p>
<p>
<code><span class="method">transliterate</span>(<span class="regex">identifier</span>)</code>Apply any <a target="_blank" href="http://userguide.icu-project.org/transforms/general">ICU script transliteration</a>. e.g. "中国".transliterate("han-latin") -> "zhōng guó".
</p>
</div>
<p class="suggestion">