Page 1 of 1

combine 2 columns into one?

Posted: 14 May 2016 03:49
by yusef88
Hi, I want "Frame height and Frame width" columns to be in one column.
after searching in the help file I reached this script but how to put it in a custom column

Code: Select all

echo property('System.Video.FrameWidth') . 'x' . property('System.Video.FrameHeight');

Re: combine 2 columns into one?

Posted: 14 May 2016 04:08
by highend
long version:

Code: Select all

    $x = property('System.Video.FrameWidth', <cc_item>);
    $y = property('System.Video.FrameHeight', <cc_item>);
    if ($x && $y) { return $x . 'x' . $y };
    else { return "<not supported>" };
short one (if you have a codec for all file formats installed and hence won't get the "x" column entry):

Code: Select all

    return property('System.Video.FrameWidth', <cc_item>) . 'x' . property('System.Video.FrameHeight', <cc_item>);

Re: combine 2 columns into one?

Posted: 14 May 2016 05:03
by yusef88
both scripts work well..thanks a lot.

Re: combine 2 columns into one?

Posted: 14 May 2016 10:22
by highend
You could also use a template instead, like:

Code: Select all

<prop 'System.Video.FrameWidth'>x<prop 'System.Video.FrameHeight'>

Re: combine 2 columns into one?

Posted: 14 May 2016 12:01
by yusef88
All Roads Lead to Rome :tup: