From 7de16ce80cbd308cae5f0fd829aee04d8efc410f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 1 Nov 2016 01:52:42 +0800 Subject: [PATCH] Added {votes} binding --- source/net/filebot/format/MediaBindingBean.java | 10 ++++++++++ source/net/filebot/ui/rename/BindingDialog.properties | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index e9fac780..a8f9e102 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -629,6 +629,16 @@ public class MediaBindingBean { return null; } + @Define("votes") + public Integer getVotes() throws Exception { + if (infoObject instanceof Movie) + return getMovieInfo().getVotes(); + if (infoObject instanceof Episode) + return getSeriesInfo().getRatingCount(); + + return null; + } + @Define("collection") public String getCollection() throws Exception { if (infoObject instanceof Movie) diff --git a/source/net/filebot/ui/rename/BindingDialog.properties b/source/net/filebot/ui/rename/BindingDialog.properties index e1716636..265473d0 100644 --- a/source/net/filebot/ui/rename/BindingDialog.properties +++ b/source/net/filebot/ui/rename/BindingDialog.properties @@ -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, 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, textLanguages, 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, votes, 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, textLanguages, 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