diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index 9ea756cb..d720180c 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -738,6 +738,11 @@ public class MediaBindingBean { }, Language.availableLanguages().stream().map(Language::getName)); } + @Define("mediaTitle") + public String getMediaTitle() { + return getMediaInfo(StreamKind.General, 0, "Title", "Movie"); + } + @Define("bitrate") public Long getBitRate() { return new Double(getMediaInfo(StreamKind.General, 0, "OverallBitRate")).longValue(); diff --git a/source/net/filebot/ui/rename/BindingDialog.properties b/source/net/filebot/ui/rename/BindingDialog.properties index 34b1199e..3ebbac4f 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, es, sxe, s00e00, t, d, startdate, absolute, special, episode, series, primaryTitle, alias, movie, tmdbid, imdbid, pi, pn, lang, subt, plex, az, anime, regular, music, album, artist, albumArtist, actors, director, collection, genre, genres, languages, certification, rating, vc, ac, cf, vf, hpi, af, channels, resolution, dim, bitdepth, ws, sdhd, source, tags, s3d, group, original, fn, ext, mediaType, file, file.name, folder, folder.name, gigabytes, crc32, info, info.runtime, info.status, omdb.rating, omdb.votes, localize.German.title, age, duration, seconds, minutes, media, media.title, 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, es, sxe, s00e00, t, d, startdate, absolute, special, episode, series, primaryTitle, alias, movie, tmdbid, imdbid, pi, pn, lang, subt, plex, az, anime, regular, music, album, artist, albumArtist, actors, director, collection, genre, genres, languages, certification, rating, vc, ac, cf, vf, hpi, af, channels, resolution, dim, bitdepth, ws, sdhd, source, tags, s3d, group, original, fn, ext, mediaType, file, file.name, folder, folder.name, gigabytes, crc32, info, info.runtime, info.status, omdb.rating, omdb.votes, localize.German.title, mediaTitle, age, duration, seconds, minutes, 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 diff --git a/source/net/filebot/ui/rename/FormatDialog.properties b/source/net/filebot/ui/rename/FormatDialog.properties index 2c44cd9b..3aa00f14 100644 --- a/source/net/filebot/ui/rename/FormatDialog.properties +++ b/source/net/filebot/ui/rename/FormatDialog.properties @@ -56,3 +56,5 @@ file.example[1]: {n.replaceAll(/\\d+/, '')} file.example[2]: {n.replaceAll(/\\p{Punct}+/, ' ')} # simple filter file.example[3]: {n.after('-')} +# restore original filename via embedded title metadata (if possible) +file.example[4]: {any{mediaTitle}{n}}