Added khz binding

This commit is contained in:
Reinhard Pointner 2017-02-09 00:42:02 +08:00
parent 20f440288a
commit 35f975e29f
3 changed files with 8 additions and 3 deletions

View File

@ -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();

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, 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

View File

@ -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