* update docs for {info} binding movie/series metadata binding
This commit is contained in:
parent
d93b58cca9
commit
517fa36038
|
@ -304,7 +304,7 @@ public class MediaBindingBean {
|
|||
}
|
||||
|
||||
|
||||
@Define("meta")
|
||||
@Define("info")
|
||||
public synchronized Object getMetaInfo() throws Exception {
|
||||
if (metaInfo == null) {
|
||||
if (infoObject instanceof Episode)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -278,6 +278,11 @@
|
|||
<td>detect subtitle language</td>
|
||||
<td>eng</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>info</td>
|
||||
<td>TheTVDB / TheMovieDB metadata</td>
|
||||
<td><any metadata></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">
|
||||
|
|
Loading…
Reference in New Issue