Added e00 convenience binding

This commit is contained in:
Reinhard Pointner 2016-10-15 02:10:47 +08:00
parent c402511f56
commit 0fb7f80a79
2 changed files with 8 additions and 3 deletions

View File

@ -155,8 +155,13 @@ public class MediaBindingBean {
@Define("es")
public List<Integer> getEpisodeNumbers() {
return getEpisodes().stream().map(it -> {
return it.getEpisode() == null ? it.getSpecial() == null ? -1 : it.getSpecial() : it.getEpisode();
}).collect(toList());
return it.getEpisode() == null ? it.getSpecial() == null ? null : it.getSpecial() : it.getEpisode();
}).filter(Objects::nonNull).collect(toList());
}
@Define("e00")
public String getE00() {
return getEpisodeNumbers().stream().map(i -> String.format("%02d", i)).collect(joining("-"));
}
@Define("sxe")

View File

@ -2,4 +2,4 @@
parameter.exclude: ^StreamKind|^UniqueID|^StreamOrder|^ID|Count$
# preview expressions (keys are tagged so they can be sorted alphabetically)
expressions: n, y, s, e, sxe, s00e00, t, d, startdate, absolute, es, sy, sc, age, special, episode, series, primaryTitle, alias, movie, tmdbid, imdbid, pi, pn, lang, subt, plex, az, type, anime, regular, music, album, artist, albumArtist, actors, director, collection, genre, genres, languages, runtime, certification, rating, vc, ac, cf, vf, hpi, af, channels, resolution, dim, bitdepth, ws, sdhd, source, tags, s3d, group, original, info, info.network, info.status, info.productionCompanies, info.productionCountries, info.certifications, info.certifications.DE, omdb.rating, omdb.votes, localize.German.name, localize.German.title, fn, ext, mediaType, mediaPath, file, file.name, folder, folder.name, mediaTitle, duration, seconds, minutes, bytes, megabytes, gigabytes, crc32, media, media.overallBitRateString, video[0], video[0].codecID, video[0].frameRate, video[0].displayAspectRatioString, video[0].scanType, audio[0], audio[0].bitRateString, audio[0].language, audio, audio.language, text[0], text[0].codecInfo, text[0].language, text, text.language
expressions: n, y, s, e, sxe, s00e00, t, d, startdate, absolute, es, e00, sy, sc, age, special, episode, series, primaryTitle, alias, movie, tmdbid, imdbid, pi, pn, lang, subt, plex, az, type, anime, regular, music, album, artist, albumArtist, actors, director, collection, genre, genres, languages, runtime, certification, rating, vc, ac, cf, vf, hpi, af, channels, resolution, dim, bitdepth, ws, sdhd, source, tags, s3d, group, original, info, info.network, info.status, info.productionCompanies, info.productionCountries, info.certifications, info.certifications.DE, omdb.rating, omdb.votes, localize.German.name, localize.German.title, fn, ext, mediaType, mediaPath, file, file.name, folder, folder.name, mediaTitle, duration, seconds, minutes, bytes, megabytes, gigabytes, crc32, media, media.overallBitRateString, video[0], video[0].codecID, video[0].frameRate, video[0].displayAspectRatioString, video[0].scanType, audio[0], audio[0].bitRateString, audio[0].language, audio, audio.language, text[0], text[0].codecInfo, text[0].language, text, text.language