Page 1 of 1

Adding text when file is a specific Video Format

Posted: 04 Dec 2013, 22:19
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.

Re: Adding text when file is a specific Video Format

Posted: 05 Dec 2013, 01:51
by rednoah
You can use {sdhd} or {dim} binding for your condition:

Code: Select all

{sdhd == 'HD' ? 'HDTV' : 'PDTV'}

Re: Adding text when file is a specific Video Format

Posted: 05 Dec 2013, 04:11
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})]