From 35f975e29ffc97cc7f1279b01b6a88cd122db115 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 9 Feb 2017 00:42:02 +0800 Subject: [PATCH] Added khz binding --- source/net/filebot/format/MediaBindingBean.java | 5 +++++ source/net/filebot/ui/rename/BindingDialog.properties | 2 +- source/net/filebot/ui/rename/FormatDialog.properties | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index ac414e25..dfcf5df2 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -773,6 +773,11 @@ public class MediaBindingBean { return String.format("%d kbps", getOverallBitRate() / 1000); } + @Define("khz") + public String getSamplingRate() { + return getMediaInfo(StreamKind.Audio, 0, "SamplingRate/String"); + } + @Define("duration") public Long getDuration() { return new Double(getMediaInfo(StreamKind.General, 0, "Duration")).longValue(); diff --git a/source/net/filebot/ui/rename/BindingDialog.properties b/source/net/filebot/ui/rename/BindingDialog.properties index 2127579c..29fa89ce 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, di, dc, 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, bitrate, kbps, 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.deu.n, localize.deu.t, localize.zho.n, localize.zho.t, order.airdate.sxe, order.dvd.sxe, fn, ext, mediaType, mediaPath, file, file.name, folder, folder.name, mediaTitle, audioLanguages, textLanguages, duration, seconds, minutes, bytes, megabytes, gigabytes, crc32, media.title, media.collection, media.season, media.part, media.partID, media.genre, media.contentType, media.description, media.lyrics, video[0].codecID, video[0].frameRate, video[0].displayAspectRatioString, video[0].scanType, audio.language, audio[0].bitRateString, audio[0].language, text.language, text[0].language, text[0].codecInfo +expressions: n, y, s, e, sxe, s00e00, t, d, startdate, absolute, es, e00, sy, sc, di, dc, 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, bitrate, kbps, khz, 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.deu.n, localize.deu.t, localize.zho.n, localize.zho.t, order.airdate.sxe, order.dvd.sxe, fn, ext, mediaType, mediaPath, file, file.name, folder, folder.name, mediaTitle, audioLanguages, textLanguages, duration, seconds, minutes, bytes, megabytes, gigabytes, crc32, media.title, media.collection, media.season, media.part, media.partID, media.genre, media.contentType, media.description, media.lyrics, video[0].codecID, video[0].frameRate, video[0].displayAspectRatioString, video[0].scanType, audio.language, audio[0].bitRateString, audio[0].language, text.language, text[0].language, text[0].codecInfo diff --git a/source/net/filebot/ui/rename/FormatDialog.properties b/source/net/filebot/ui/rename/FormatDialog.properties index ee028200..cd8f57e5 100644 --- a/source/net/filebot/ui/rename/FormatDialog.properties +++ b/source/net/filebot/ui/rename/FormatDialog.properties @@ -40,9 +40,9 @@ music.example[0]: {artist} - {t} # simple artist - album - title music.example[1]: {[y]} {artist} - {t} # artist - title [48.0 kHz] -music.example[2]: {n} - {t} {[audio.SamplingRateString]} +music.example[2]: {n} - {t} {[khz]} # artist - title [2ch, 128000] -music.example[3]: {pi.pad(2)} {n} - {t} {[af, audio.BitRate]} +music.example[3]: {pi.pad(2)} {n} - {t} {[af, kbps]} # organize folder structure music.example[4]: {n}/{album+'/'}{pi.pad(2)+'. '} {t} # plex standard