Adding text when file is a specific Video Format

All about user-defined episode / movie format expressions
Post Reply
g3rman
Donor
Posts: 14
Joined: 24 Oct 2013, 16:14

Adding text when file is a specific Video Format

Post by g3rman »

I would like to add "HDTV" to my filenames if the Video Format is 720 or 1080 and PDTV if the file is SD. Also if the file is SD
it should leave out the Video Format.

For example:

Firefly - S01E01 [HDTV 720p(x264)]

If the file is SD it should look like

Firefly - S01E01 [PDTV[XviD)]


Any help would be appreciated.
User avatar
rednoah
The Source
Posts: 19128
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Adding text when file is a specific Video Format

Post by rednoah »

You can use {sdhd} or {dim} binding for your condition:

Code: Select all

{sdhd == 'HD' ? 'HDTV' : 'PDTV'}
:idea: Please read the FAQ and How to Request Help.
g3rman
Donor
Posts: 14
Joined: 24 Oct 2013, 16:14

Re: Adding text when file is a specific Video Format

Post by g3rman »

Danke!! Thanks also go to Igor for some sample code in one of his previous posts.

Format:

Code: Select all

{n} - {S00E00}\{n} - {S00E00} ({airdate.format("dd MMMM yyyy")}) [{(dim[1]>480 &&  dim[0]==1280) ? 'HDTV 720p ' : (dim[1]>720 && dim[0]==1920) ? 'HDTV 1080p ' : 'PDTV'}({vc})]
Post Reply