<view name="Video (790)" extensions="AVI,DIVX,MPG,MPEG,MPE,DAT,ASF,VOB,MKV,OGM,M2TS,TS,MTS,MOV,WMV,MP4,M4V,AVC,FLV,D2V">
<![CDATA[
uses 'Common';
if Get('Cover') <> '' then LineAddCover('', 5, 5);
LineAddHeader(GetName('General'));
AddCheck('Title', 'General');
LineAddText(GetName('Duration'), FormatDuration(Get('Duration', 'General')));
if GetCount('Video') > 0 then
begin
LineAddHeader(GetName('Video'));
for i:=0 to GetCount('Video')-1 do
begin
sName:='['+String(i)+'] ';
stream := Get('Width', 'Video', i) + 'x' + Get('Height', 'Video', i);
dar := Get('DisplayAspectRatio/String', 'Video', i);
if dar <> '' then stream := stream + ' (' + dar + ')';
LineAddText(sName, stream);
end;
end;
if GetCount('Audio') > 0 then
begin
LineAddHeader(GetName('Audio'));
for i:=0 to GetCount('Audio')-1 do
begin
sName:='['+String(i)+'] ';
sTitle := Get('Title', 'Audio', i);
stream:=sTitle;
sCN := Get('Channel(s)', 'Audio', i);
if sCN <> '' then stream:=stream + ' (' + FormatChannels(sCN) + ')';
LineAddText(sName, stream);
end;
end;
// add line if value is not empty
procedure AddCheck(Field, Context);
begin
R:=Get(Field, Context);
if R = '' then Exit;
LineAddField(Field, Context);
end;
]]>
</view>
|