<?xml version="1.0" encoding="utf-8"?>
<HmsMediaItem>
  <MediaType>3</MediaType>
  <ClassID>51</ClassID>
  <ItemID>daa53b34-8803-472a-855e-e1ddb70079a1</ItemID>
  <ItemPath></ItemPath>
  <ParentID>234DF17B-418C-4FDC-9DFE-CD0C586D2E76</ParentID>
  <Properties>
    <Property>
      <ID>4</ID>
      <Value>Torrent TV</Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>515</ID>
      <Value>1</Value>
    </Property>
    <Property>
      <ID>700</ID>
      <Value>0</Value>
    </Property>
    <Property>
      <ID>701</ID>
      <Value>-1</Value>
    </Property>
    <Property>
      <ID>702</ID>
      <Value>-1</Value>
    </Property>
    <Property>
      <ID>517</ID>
      <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
    </Property>
    <Property>
      <ID>518</ID>
      <Value>0</Value>
    </Property>
    <Property>
      <ID>512</ID>
      <Value>0</Value>
    </Property>
    <Property>
      <ID>532</ID>
      <Value>1</Value>
    </Property>
    <Property>
      <ID>553</ID>
      <Value>1</Value>
    </Property>
    <Property>
      <ID>522</ID>
      <Value>0</Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>570</ID>
      <Value>2</Value>
    </Property>
    <Property>
      <ID>93</ID>
      <Value>41291,401043287</Value>
    </Property>
    <Property>
      <ID>550</ID>
      <Value>const
//csCommandLine1 = &apos;cmd://"%s"   --udp-caching=1500 --no-crashdump --play-and-exit --language en -Idummy --demuxdump-file="&lt;OUTPUT FILE&gt;" --access=p2p_access "%s" :demux=dump&apos;;
  csCommandLine1 = &apos;cmd://"%s"   --no-crashdump --play-and-exit --language en -Idummy --demuxdump-file="&lt;OUTPUT FILE&gt;" vlc://pause:2 --access=p2p_access "%s" :demux=dump&apos;;
  csCommandLine2 = &apos;cmd://"%s"   --no-crashdump --play-and-exit --language en --no-auto-preparse --no-playlist-autostart --extraintf=dummy -Iluaintf --lua-intf=hmsts --lua-config "hmsts={torrentfile=&apos;#39&apos;%s&apos;#39&apos;, torrentsubfile=&apos;#39&apos;%s&apos;#39&apos;}" --demuxdump-file="&lt;OUTPUT FILE&gt;" --access=p2p_access "%s"&apos;;
   
  csHmsTsLuaScript = 
    &apos;local PlaylistItem&apos;#13#10 + 
    &apos;&apos;#13#10 +
    &apos;local bPlaylistExists = 1&apos;#13#10 +
    &apos;local iPlaylistItemID = -1&apos;#13#10 +
    &apos;&apos;#13#10 +
    &apos;while (bPlaylistExists == 1) and not vlc.misc.should_die() do&apos;#13#10 +
    &apos;  bPlaylistExists = 0&apos;#13#10 +
    &apos;  PlaylistItem = vlc.playlist.get("playlist")&apos;#13#10 +
    &apos;  for i = 1, #PlaylistItem.children do&apos;#13#10 +
    &apos;    if (PlaylistItem.children[i].name == config.torrentfile) then&apos;#13#10 +
    &apos;      bPlaylistExists = 1&apos;#13#10 +
    &apos;    end&apos;#13#10 +
    &apos;  end&apos;#13#10 +
    &apos;  if (bPlaylistExists == 0) then&apos;#13#10 + 
    &apos;    for i = 1, #PlaylistItem.children do&apos;#13#10 +
    &apos;      if PlaylistItem.children[i].name == config.torrentsubfile then&apos;#13#10 +
    &apos;        iPlaylistItemID = PlaylistItem.children[i].id&apos;#13#10 +
    &apos;        break&apos;#13#10 +
    &apos;      end&apos;#13#10 +
    &apos;    end&apos;#13#10 +
    &apos;  else&apos;#13#10 +
    &apos;    vlc.misc.mwait ( vlc.misc.mdate() + 10000)&apos;#13#10 +
    &apos;  end&apos;#13#10 +
    &apos;end&apos;#13#10 +
    &apos;&apos;#13#10 +
    &apos;vlc.var.create(vlc.object.libvlc(), "demux", "dump")&apos;#13#10 +
    &apos;&apos;#13#10 +
    &apos;if iPlaylistItemID ~= -1 then&apos;#13#10 + 
    &apos;  vlc.playlist.goto(iPlaylistItemID)&apos;#13#10 +
    &apos;end&apos;#13#10; 

 
procedure CreateHmsTsLuaScript;
var
  sFileName: string;
begin
  sFileName := IncludeTrailingBackslash(RegistryRead(&apos;Software\AceStream\InstallDir&apos;)) + &apos;Player\lua\intf\hmsts.lua&apos;;
  if not FileExists(sFileName) then
    HmsStringToFile(csHmsTsLuaScript, sFileName)
end; 

// ---------------------------------------------------------------------------------------
// Получение пути TorrentStream плеера

function GetTsPlayerPath: string;
var
  sResult: string;
begin
  sResult := IncludeTrailingBackslash(RegistryRead(&apos;Software\AceStream\InstallDir&apos;)) + &apos;player\ace_player.exe&apos;;
  Result := ExtractShortPathName(sResult);
  if Result = &apos;&apos; then Result := sResult
end;

procedure CopyProperties(aSourceItem, aDestItem: THmsScriptMediaItem; const aProperties: array of Integer);
var
  i: Integer;
begin
  for i := 0 to Length(aProperties) - 1 do  
    aDestItem.Properties[aProperties[i]] := aSourceItem.Properties[aProperties[i]]
end;

function EscapeChars(const aText: string): string;
var
  i: Integer;
begin
  Result := &apos;&apos;;
  for i := 1 to Length(aText) do begin
    if aText[i] in [#39, &apos;\&apos;] then
      Result := Result + &apos;\&apos;;
    Result := Result + aText[i]
  end    
end;

procedure CreateTorrentSubItem(const aName, aPath: string; aFileSize: Variant; 
                       const aTorrentFileName: string; aSubFileIndex: Integer);
var
  sName: string;
  TorrentSubItem: THmsScriptMediaItem;
begin
  if HmsFileMediaType(aName) = mtVideo then begin
    TorrentSubItem := HmsCreateMediaItem(aName, PodcastItem.ItemID, aPath);        
    if TorrentSubItem &lt;&gt; nil then begin        
      TorrentSubItem.Properties[mpiFileSize] := aFileSize;
      if aPath &lt;&gt; &apos;&apos; then
        sName := IncludeTrailingBackslash(aPath) + aName
      else
        sName := aName;
      TorrentSubItem.Properties[mpiMediaResourceLink] := 
         Format(csCommandLine2, [GetTsPlayerPath, EscapeChars(ExtractFileName(aTorrentFileName)), EscapeChars(sName), aTorrentFileName]);
      CopyProperties(PodcastItem, TorrentSubItem, [mpiFilePath, mpiThumbnail, mpiComment, mpiTimeLength, mpiYear, mpiGenre, mpiDirector, mpiCreateDate]);
      TorrentSubItem.Properties[mpiTitle] := aName;         
    end
  end    
end;

procedure CreateTorrentItems(const aFileName: string);
var
  i: Integer;
  TorrentFile: TTorrentFile;  
  TorrentSubFile: TTorrentSubFile;  
begin
  TorrentFile := TTorrentFile.Create;  
  try
    TorrentFile.LoadFromFile(aFileName);
    if SameText(PodcastItem.Properties[mpiTitle], ExtractFileName(mpFilePath)) then
      PodcastItem.Properties[mpiTitle] := TorrentFile.Name;
    if TorrentFile.MultiFile then    
      for i := 0 to TorrentFile.Count - 1 do begin
        TorrentSubFile := TorrentFile.Files[i];
        CreateTorrentSubItem(TorrentSubFile.Name, TorrentSubFile.Path, TorrentSubFile.Length, aFileName, i)         
      end      
    else     
      CreateTorrentSubItem(TorrentFile.Name, &apos;&apos;, TorrentFile.Length, aFileName, 0)
  finally
    TorrentFile.Free
  end    
end;

var
  bFileExists: Boolean; iFlags: Integer;
  sID, sTmpFile, sWebPage, sHeaders, sAnswerHeaders, sToken, sCookie: string;
  mail, pass, sPage: string;
begin
  Randomize; 
    
  sHeaders := mpFilePath+#10#13+
              &apos;Accept-Encoding: gzip, deflate&apos;+#10#13+
              &apos;User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36&apos;+#10#13;

  iFlags   := StrToInt(&apos;$80080000&apos;); // INTERNET_FLAG_RELOAD и INTERNET_FLAG_NO_COOKIES - куки добавляем сами
  HmsSendRequestEx(&apos;torrent-tv.ru&apos;, &apos;/banhammer/pid&apos;, &apos;GET&apos;, &apos;application/x-www-form-urlencoded&apos;, sHeaders, &apos;&apos;, 80, iFlags, sAnswerHeaders, true);
  HmsRegExMatch(&apos;X-BH-Token: (.*?)\r&apos;, sAnswerHeaders, sToken); 
  sHeaders := sHeaders+&apos;Cookie: BHC=&apos;+sToken+#10#13;

  mail := HmsHttpEncode( HmsUtf8Encode(mpPodcastAuthorizationUserName));  // логин
  pass := HmsHttpEncode( HmsUtf8Encode(mpPodcastAuthorizationPassword));  // пароль
  HmsSendRequestEx(&apos;torrent-tv.ru&apos;, &apos;/auth.php&apos;, &apos;POST&apos;, &apos;application/x-www-form-urlencoded&apos;, sHeaders, &apos;email=&apos;+mail+&apos;&amp;password=&apos;+pass+&apos;&amp;remember=on&amp;enter=%D0%92%D0%BE%D0%B9%D1%82%D0%B8&apos;,80, iFlags, sAnswerHeaders, true);

  if HmsRegExMatch(&apos;(PHPSESSID=.*?);&apos;, sAnswerHeaders, sCookie) then
    sHeaders := sHeaders+&apos;Cookie: &apos;+sCookie+#10#13;
  if HmsRegExMatch(&apos;(torrenttv_remember=.*?);&apos;, sAnswerHeaders, sCookie) then
    sHeaders := sHeaders+&apos;Cookie: &apos;+sCookie+#10#13;

  HmsRegExMatch(&apos;//.*?(/.*)&apos;, mpFilePath, sPage);
  sWebPage := HmsSendRequestEx(&apos;torrent-tv.ru&apos;, sPage, &apos;GET&apos;, &apos;application/x-www-form-urlencoded&apos;, sHeaders, &apos;&apos;, 80, iFlags, sAnswerHeaders, true);
  sWebPage := HmsUtf8Decode(sWebPage);
  sWebPage := HmsRemoveLineBreaks(sWebPage);

  if not HmsRegExMatch(&apos;loadTorrent..(.*?)",&apos;    , sWebPage, sID) then
         HmsRegExMatch(&apos;this.loadPlayer..(.*?)",&apos;, sWebPage, sID);
  if (sID =&apos;&apos;) then sWebPage := HmsDownloadURL(sID, &apos;Referer: &apos;+sHeaders, true); 
  
  if (sID&lt;&gt;&apos;&apos;) then HmsLogMessage(1, &apos;Открываем по ID &apos; + mpTitle ) 
               else HmsLogMessage(1, &apos;Открываем по торренту &apos; + mpTitle );

  mpTitle  := Copy(mpTitle, 1, 20);
  sTmpFile := HmsTempDirectory + &apos;\&apos; + mpTitle + &apos;.acelive&apos;;
  bFileExists := FileExists(sTmpFile);
    
  if (sID&lt;&gt;&apos;&apos;) then begin
    MediaResourceLink := Format(csCommandLine1, [GetTsPlayerPath, sID]);
    exit;
  end;

  if not bFileExists then bFileExists := HmsDownloadURLToFile(sID, sTmpFile);

  if bFileExists then begin
    MediaResourceLink := Format(csCommandLine1, [GetTsPlayerPath, sTmpFile]);
  end else
    HmsLogMessage(1, &apos;Ошибка при загрузке торрента "&apos; + mpFilePath + &apos;"&apos;);

end.</Value>
    </Property>
    <Property>
      <ID>551</ID>
      <Value>PascalScript</Value>
    </Property>
    <Property>
      <ID>530</ID>
      <Value>const
  PCRE_CASELESS   = $00000001;  
  PCRE_DOTALL     = $00000004;
  PCRE_SINGLELINE = PCRE_CASELESS + PCRE_DOTALL;       
  
var
  sWebPage, sAnswerHeaders, sToken, sHeaders, sPage, mail, pass, sCookie: string;
  ItemsRegExpr: TRegExpr; i, iFlags: Integer; gsNameArray: string; 
   
/////////////////////////////////////////////////////////////////////////////// 
Procedure DeleteOldLinks();
Var
  i: Integer; Item: THmsScriptMediaItem;
Begin
  For i := FolderItem.ChildCount-1 DownTo 0 Do Begin
    Item := FolderItem.ChildItems[i];
    If Item[4001] = &apos;1&apos; Then Item.Delete;
  End;
End;

/////////////////////////////////////////////////////////////////////////////// 
procedure Kanal(const aItemDescr: string);
var
  sLink, sName, sImg, sBase: string;
  Item: THmsScriptMediaItem;
begin
  HmsRegExMatch(&apos;&lt;a[^&gt;]+href="(.*?)"&apos;   , aItemDescr, sLink); 
  HmsRegExMatch(&apos;&lt;strong&gt;(.*?)&lt;/strong&gt;&apos;, aItemDescr, sName);
  HmsRegExMatch(&apos;&lt;img src="(.*?)"&apos;      , aItemDescr, sImg );
  
  sBase := &apos;http://torrent-tv.ru/&apos;;     // База, для коротких (относительных) ссылок
  sName := HmsHtmlToText(sName);        // Если в названиях будут теги html - избавляемся от них
  sLink := HmsExpandLink(sLink, sBase); // Дополняем, если нужно, до полной ссылки
  sImg  := HmsExpandLink(sImg , sBase); // Дополняем, если нужно, до полной ссылки
  
  // Пытаемся найти элемент по наименованию
  Item := FolderItem.FindItemByProperty(mpiTitle, sName);
  // Если не найден - создаём
  if Item = nil then Item := HmsCreateMediaItem(sLink, FolderItem.ItemID);
  // Обновляем всю информацию
  Item[mpiFilePath      ] := sLink;
  Item[mpiTitle         ] := sName;
  Item[mpiThumbnail     ] := sImg; 
  Item[mpiTimeLength    ] := &apos;11:40:00.000&apos;; // длинная длительность 
  Item[mpiInternetItem  ] := &apos;1&apos;;
  Item[mpiDVDAspectRatio] := &apos;16:9&apos;;
  Item[4001             ] := &apos;&apos;; // Снимаем пометку удаления
end;
  
///////////////////////////////////////////////////////////////////////////////
// ========================================================================= // 
begin
  // Помечаем все созданные ранее ссылки для удаления
  For i := 0 to FolderItem.ChildCount-1 Do FolderItem.ChildItems[i].Properties[4001] := &apos;1&apos;;

  sHeaders := mpFilePath+#10#13+
              &apos;Accept-Encoding: gzip, deflate&apos;+#10#13+
              &apos;User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36&apos;+#10#13;

  iFlags   := StrToInt(&apos;$80080000&apos;); // INTERNET_FLAG_RELOAD и INTERNET_FLAG_NO_COOKIES - куки добавляем сами
  HmsSendRequestEx(&apos;torrent-tv.ru&apos;, &apos;/banhammer/pid&apos;, &apos;GET&apos;, &apos;application/x-www-form-urlencoded&apos;, sHeaders, &apos;&apos;, 80, iFlags, sAnswerHeaders, true);
  HmsRegExMatch(&apos;X-BH-Token: (.*?)\r&apos;, sAnswerHeaders, sToken); 
  sHeaders := sHeaders+&apos;Cookie: BHC=&apos;+sToken+#10#13;

  mail := HmsHttpEncode( HmsUtf8Encode(mpPodcastAuthorizationUserName));  // логин
  pass := HmsHttpEncode( HmsUtf8Encode(mpPodcastAuthorizationPassword));  // пароль
  HmsSendRequestEx(&apos;torrent-tv.ru&apos;, &apos;/auth.php&apos;, &apos;POST&apos;, &apos;application/x-www-form-urlencoded&apos;, sHeaders, &apos;email=&apos;+mail+&apos;&amp;password=&apos;+pass+&apos;&amp;remember=on&amp;enter=%D0%92%D0%BE%D0%B9%D1%82%D0%B8&apos;,80, iFlags, sAnswerHeaders, true);

  if HmsRegExMatch(&apos;(PHPSESSID=.*?);&apos;, sAnswerHeaders, sCookie) then
    sHeaders := sHeaders+&apos;Cookie: &apos;+sCookie+#10#13;
  if HmsRegExMatch(&apos;(torrenttv_remember=.*?);&apos;, sAnswerHeaders, sCookie) then
    sHeaders := sHeaders+&apos;Cookie: &apos;+sCookie+#10#13;

  HmsRegExMatch(&apos;//.*?(/.*)&apos;, mpFilePath, sPage);
  sWebPage := HmsSendRequestEx(&apos;torrent-tv.ru&apos;, sPage, &apos;GET&apos;, &apos;application/x-www-form-urlencoded&apos;, sHeaders, &apos;&apos;, 80, iFlags, sAnswerHeaders, true);
  sWebPage := HmsUtf8Decode(sWebPage);
  sWebPage := HmsRemoveLineBreaks(sWebPage);
     
  ItemsRegExpr := TRegExpr.Create(&apos;best-channels-content(.*?)&lt;/h5&gt;&apos;, PCRE_SINGLELINE);  // поиск блоков, который будет между скобок
  try
    if ItemsRegExpr.Search(sWebPage) then repeat // искать в исх.строке совпадение и повторять
      Kanal(ItemsRegExpr.Match)                  // запускать процедуру получения свойств фильма каждый раз как найден объект
    until not ItemsRegExpr.SearchAgain; 
  finally       
    ItemsRegExpr.Free;
  end;

  DeleteOldLinks(); // Удаляем ссылки, имён которых мы не обновляли (устаревшие)
end.</Value>
    </Property>
    <Property>
      <ID>531</ID>
      <Value>PascalScript</Value>
    </Property>
    <Property>
      <ID>571</ID>
      <Value>const
  PCRE_CASELESS   = $00000001;  
  PCRE_DOTALL     = $00000004;
  PCRE_SINGLELINE = PCRE_CASELESS + PCRE_DOTALL;       
  reg1 = &apos;(\d\d\d)&apos;;
  reg2 = &apos;(\d\d)&apos;;
  reg3 = &apos;(\d)&apos;;
  cifr = [&apos;0&apos;,&apos;1&apos;,&apos;2&apos;,&apos;3&apos;,&apos;4&apos;,&apos;5&apos;,&apos;6&apos;,&apos;7&apos;,&apos;8&apos;,&apos;9&apos;];
  
var
  s,s1,s2,ini, file,kat,id,pap,pap1,mes,god,adres: string;
  j,i,aPercent,e,grp:Integer;
  ItemsRegExpr,ItemsRegExpr1,ItemsRegExpr2: TRegExpr;
  sWebPage_,sWebPage_1,sWebPage,sWebPage1,sWebPage2,total,total1: string;
  Item: THmsScriptMediaItem;
  myYear, myMonth, myDay : Word;
  k:byte;
kol,adr,n,adr_m,adr_f: string;
    kol_i,ka:integer;
    dlit,nazv,thum:string;
  
 
   procedure kanal(const aItemDescr2: string); 
   begin
         
             
        HmsRegExMatch(&apos;"(.*?)"&apos;, aItemDescr2, adr); 
         HmsRegExMatch(&apos;"&gt;(.*?)&lt;/a&gt;&apos;, aItemDescr2, nazv);
     //    HmsRegExMatch(&apos;&lt;a href="(.*?)"&apos;, aItemDescr2, thum);
          adr:=&apos;http://torrent-tv.ru/&apos;+adr;
        Item := HmsCreateMediaItem(adr, FolderItem.ItemID,kat ); 
         
          Item.Properties[mpiTitle] := nazv ;
          Item.Properties[mpiThumbnail ] := thum; 
   
   
   end;
  
  
  
 procedure kategor(const aItemDescr: string);   // поцедура выделение свойств фильмов   aItemDescr -строка -результат поиска ItemsRegExpr1.Match между  &lt;li&gt; и &lt;/li&gt;
  
  var              //   обьявление в процедуре              
    Item: THmsScriptMediaItem;   // обьект Item из класса THmsScriptMediaItem -пункт в перечне фильмов
            //  строка
    

    
  begin               //      начало процедуры
       HmsRegExMatch(&apos;style="color: #FFF;"&gt;(.*?)&lt;/a&gt;&apos;, aItemDescr, kat);
       
       ItemsRegExpr2 := TRegExpr.Create(&apos;&lt;a href=(.*?)&lt;/li&gt;&apos;,PCRE_SINGLELINE); 
        try
      if ItemsRegExpr2.Search(aItemDescr) then repeat    //искать в исх.строке объект и повторять
      kanal(ItemsRegExpr2.Match)   //запускать процедуру получения свойств фильма каждый раз как найден объект
      until not ItemsRegExpr2.SearchAgain; 
    finally       
      ItemsRegExpr2.Free;
        end; 
         
       
  end;           
  

 


 
begin
       //j:=0;
  
   // FolderItem.DeleteChildItems; 
  //  mpfilepath:=&apos;http://torrent-tv.ru/category.php?cat=8&apos;;
    mpfilepath:=&apos;http://torrent-tv.ru&apos;;
    sWebPage1 := HmsDownloadURL(mpfilepath); 
     sWebPage1 :=HmsUtf8Decode (sWebPage1);
    sWebPage1 :=HmsRemoveLineBreaks(sWebPage1);
     
 //  
    
  
      ItemsRegExpr1 := TRegExpr.Create(&apos;category.php(.*?)&lt;/li&gt;&lt;li&gt;&apos;,PCRE_SINGLELINE);  //создать объект с содерж. между кавычек
    try
      if ItemsRegExpr1.Search(sWebPage1) then repeat    //искать в исх.строке объект и повторять
       kategor(ItemsRegExpr1.Match)   //запускать процедуру получения свойств фильма каждый раз как найден объект
      until not ItemsRegExpr1.SearchAgain; 
    finally       
      ItemsRegExpr1.Free;
     end  ; 

HmsHideInformation  ;  


end.</Value>
    </Property>
    <Property>
      <ID>572</ID>
      <Value>PascalScript</Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>-1</ID>
      <Value></Value>
    </Property>
    <Property>
      <ID>245</ID>
      <Value>daa53b34-8803-472a-855e-e1ddb70079a1</Value>
    </Property>
    <Property>
      <ID>95</ID>
      <Value>3</Value>
    </Property>
    <Property>
      <ID>215</ID>
      <Value>mpTitle</Value>
    </Property>
    <Property>
      <ID>55</ID>
      <Value>http://torrent-tv.ru/images/logo.png</Value>
    </Property>
    <Property>
      <ID>50</ID>
      <Value>Фильмы (Ремуксирование)</Value>
    </Property>
  </Properties>
  <ChildItems>
    <Item>
      <ClassID>53</ClassID>
      <ItemID>f46a993e-65db-4f37-84e0-9aedaba77ee6</ItemID>
      <ItemPath></ItemPath>
      <ParentID>daa53b34-8803-472a-855e-e1ddb70079a1</ParentID>
      <Properties>
        <Property>
          <ID>515</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>512</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>532</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>700</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>553</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>4</ID>
          <Value>Избранные</Value>
        </Property>
        <Property>
          <ID>701</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>702</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>517</ID>
          <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
        </Property>
        <Property>
          <ID>518</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>522</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>245</ID>
          <Value>f46a993e-65db-4f37-84e0-9aedaba77ee6</Value>
        </Property>
        <Property>
          <ID>93</ID>
          <Value>41784,5774392245</Value>
        </Property>
        <Property>
          <ID>525</ID>
          <Value>42042,7087693403</Value>
        </Property>
        <Property>
          <ID>42</ID>
          <Value>3</Value>
        </Property>
      </Properties>
    </Item>
    <Item>
      <ClassID>53</ClassID>
      <ItemID>b68d3085-0e62-4a5e-b096-ef62dfc7e953</ItemID>
      <ItemPath>http://torrent-tv.ru/hd_channels.php</ItemPath>
      <ParentID>daa53b34-8803-472a-855e-e1ddb70079a1</ParentID>
      <Properties>
        <Property>
          <ID>515</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>512</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>532</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>700</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>553</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>4</ID>
          <Value>HD</Value>
        </Property>
        <Property>
          <ID>701</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>702</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>517</ID>
          <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
        </Property>
        <Property>
          <ID>518</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>522</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>245</ID>
          <Value>b68d3085-0e62-4a5e-b096-ef62dfc7e953</Value>
        </Property>
        <Property>
          <ID>93</ID>
          <Value>41657,8676109375</Value>
        </Property>
        <Property>
          <ID>525</ID>
          <Value>42234,9735925347</Value>
        </Property>
        <Property>
          <ID>42</ID>
          <Value>3</Value>
        </Property>
      </Properties>
    </Item>
    <Item>
      <ClassID>51</ClassID>
      <ItemID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ItemID>
      <ItemPath></ItemPath>
      <ParentID>daa53b34-8803-472a-855e-e1ddb70079a1</ParentID>
      <Properties>
        <Property>
          <ID>515</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>512</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>532</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>700</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>553</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>42</ID>
          <Value>3</Value>
        </Property>
        <Property>
          <ID>4</ID>
          <Value>Категории</Value>
        </Property>
        <Property>
          <ID>701</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>702</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>517</ID>
          <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
        </Property>
        <Property>
          <ID>518</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>522</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>570</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>245</ID>
          <Value>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</Value>
        </Property>
        <Property>
          <ID>93</ID>
          <Value>41791,097291713</Value>
        </Property>
      </Properties>
      <ChildItems>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>4a64cb82-7fe5-436d-a068-fd1759a220e4</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=9</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>XXX</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>4a64cb82-7fe5-436d-a068-fd1759a220e4</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41657,8653941435</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42182,7624151505</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>650f99de-f849-4864-8e81-3815934eb051</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=10</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Мужские</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,4038803819</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,7721291435</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>81b3949c-8d92-449f-a1e0-3d3ce52940c6</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=2</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Музыка</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,4036305208</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>81b3949c-8d92-449f-a1e0-3d3ce52940c6</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42193,6796945833</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>3a5ef185-80cc-43e1-ae09-5177f06e5df3</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=6</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Познавательные</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,403352581</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>3a5ef185-80cc-43e1-ae09-5177f06e5df3</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42182,0884461921</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>01114956-a44c-4ab3-a832-cd9be25bd457</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=4</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Спорт</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,4031054167</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42180,0403177894</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>3c131ec2-b556-48d2-9931-1236e449d364</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=3</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Фильмы</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,4028075116</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>3c131ec2-b556-48d2-9931-1236e449d364</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42180,0504158912</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>8d821786-4281-4ed6-b1d6-51534694a017</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=8</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Развлекательные</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,4022379282</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>8d821786-4281-4ed6-b1d6-51534694a017</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42188,9905448264</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>b8c820f0-a804-4b11-a631-b40818ba29b2</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=7</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Новостные</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,4017085185</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42188,9703466898</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>a1775721-0c9f-48ac-93d1-1d2fb032a37e</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=5</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Общие</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>41291,4013226042</Value>
            </Property>
            <Property>
              <ID>530</ID>
              <Value>const
  PCRE_CASELESS   = $00000001;  
  PCRE_DOTALL     = $00000004;
  PCRE_SINGLELINE = PCRE_CASELESS + PCRE_DOTALL;       
  reg1 = &apos;(\d\d\d)&apos;;
  reg2 = &apos;(\d\d)&apos;;
  reg3 = &apos;(\d)&apos;;
  cifr = [&apos;0&apos;,&apos;1&apos;,&apos;2&apos;,&apos;3&apos;,&apos;4&apos;,&apos;5&apos;,&apos;6&apos;,&apos;7&apos;,&apos;8&apos;,&apos;9&apos;];
  
var
  s,s1,s2,ini, file,kat,id,pap,pap1,mes,god,adres: string;
  j,i,aPercent,e,grp:Integer;
  ItemsRegExpr,ItemsRegExpr1,ItemsRegExpr2: TRegExpr;
  sWebPage_,sWebPage_1,sWebPage,sWebPage1,sWebPage2,total,total1: string;
  Item: THmsScriptMediaItem;
  myYear, myMonth, myDay : Word;
  k:byte;
kol,adr,n,adr_m,adr_f: string;
    kol_i,ka:integer;
    dlit,nazv,thum:string;
  
 
   procedure kanal(const aItemDescr2: string); 
   begin
         
             
        HmsRegExMatch(&apos;&lt;a href="(.*?)"&apos;, aItemDescr2, adr); 
         HmsRegExMatch(&apos;&lt;strong&gt;(.*?)&lt;/strong&gt;&apos;, aItemDescr2, nazv);
         HmsRegExMatch(&apos;&lt;a href="(.*?)"&apos;, aItemDescr2, thum);
          adr:=&apos;http://torrent-tv.ru/&apos;+adr;
        Item := HmsCreateMediaItem(adr, FolderItem.ItemID, ); 
         
          Item.Properties[mpiTitle] := nazv ;
          Item.Properties[mpiThumbnail ] := thum; 
   
   
   end;
  
  
  
 procedure kategor(const aItemDescr: string);   // поцедура выделение свойств фильмов   aItemDescr -строка -результат поиска ItemsRegExpr1.Match между  &lt;li&gt; и &lt;/li&gt;
  
  var              //   обьявление в процедуре              
    Item: THmsScriptMediaItem;   // обьект Item из класса THmsScriptMediaItem -пункт в перечне фильмов
            //  строка
    

    
  begin               //      начало процедуры
       HmsRegExMatch(&apos;style="color: #FFF;"&gt;(.*?)&lt;/a&gt;&apos;, sWebPage1, kat);
       
       ItemsRegExpr2 := TRegExpr.Create(&apos;&lt;li onclick=(.*?)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&apos;,PCRE_SINGLELINE); 
        try
      if ItemsRegExpr2.Search(aItemDescr) then repeat    //искать в исх.строке объект и повторять
      kanal(ItemsRegExpr2.Match)   //запускать процедуру получения свойств фильма каждый раз как найден объект
      until not ItemsRegExpr2.SearchAgain; 
    finally       
      ItemsRegExpr2.Free;
        end; 
         
       
  end;           
  

 


 
begin
       //j:=0;
  
    FolderItem.DeleteChildItems; 
  //  mpfilepath:=&apos;http://torrent-tv.ru/category.php?cat=8&apos;;
    sWebPage1 := HmsDownloadURL(mpfilepath); 
     sWebPage1 :=HmsUtf8Decode (sWebPage1);
    sWebPage1 :=HmsRemoveLineBreaks(sWebPage1);
     
 //  
    
  
      ItemsRegExpr1 := TRegExpr.Create(&apos;&lt;div class="best-channels-content"(.*?)&lt;/h5&gt;&apos;,PCRE_SINGLELINE);  //создать объект с содерж. между кавычек
    try
      if ItemsRegExpr1.Search(sWebPage1) then repeat    //искать в исх.строке объект и повторять
       kanal(ItemsRegExpr1.Match)   //запускать процедуру получения свойств фильма каждый раз как найден объект
      until not ItemsRegExpr1.SearchAgain; 
    finally       
      ItemsRegExpr1.Free;
     end  ; 

HmsHideInformation  ;  


end.</Value>
            </Property>
            <Property>
              <ID>531</ID>
              <Value>PascalScript</Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>-1</ID>
              <Value></Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>a1775721-0c9f-48ac-93d1-1d2fb032a37e</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42180,0506618056</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>3fd6a69b-18b1-4fbd-b043-a397aaa2b868</ItemID>
          <ItemPath>http://torrent-tv.ru/on_moderation.php</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>На модерации</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>3fd6a69b-18b1-4fbd-b043-a397aaa2b868</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42041,8126561921</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42188,9706745602</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>73a2c4d3-a94a-4476-8b9e-f59201547bd3</ItemID>
          <ItemPath>http://torrent-tv.ru/index.php</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Популярные</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>73a2c4d3-a94a-4476-8b9e-f59201547bd3</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42041,8143009144</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42193,6847056366</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>d8c32d90-fb5f-4230-8890-b27e7dbe1052</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=1</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Детские</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>d8c32d90-fb5f-4230-8890-b27e7dbe1052</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42041,9355829745</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42180,0507865856</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>9b91fabf-dd19-4b50-8890-4d81d19dfda9</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=11</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Региональные</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>9b91fabf-dd19-4b50-8890-4d81d19dfda9</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42041,9364160069</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42180,0508216782</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>69daf825-1e12-44cf-940e-679c69a7332f</ItemID>
          <ItemPath>http://torrent-tv.ru/category.php?cat=12</ItemPath>
          <ParentID>afe0805e-2e1d-4d5d-af10-c1e04504f3a0</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Религиозные</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>69daf825-1e12-44cf-940e-679c69a7332f</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42041,9385848611</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42180,0508679745</Value>
            </Property>
          </Properties>
        </Item>
      </ChildItems>
    </Item>
    <Item>
      <ClassID>51</ClassID>
      <ItemID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ItemID>
      <ItemPath></ItemPath>
      <ParentID>daa53b34-8803-472a-855e-e1ddb70079a1</ParentID>
      <Properties>
        <Property>
          <ID>515</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>512</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>532</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>700</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>553</ID>
          <Value>2</Value>
        </Property>
        <Property>
          <ID>4</ID>
          <Value>Фильмы</Value>
        </Property>
        <Property>
          <ID>701</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>702</ID>
          <Value>-1</Value>
        </Property>
        <Property>
          <ID>517</ID>
          <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
        </Property>
        <Property>
          <ID>518</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>522</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>570</ID>
          <Value>0</Value>
        </Property>
        <Property>
          <ID>245</ID>
          <Value>5c35b398-8e05-4ed9-ba01-76268c2e1197</Value>
        </Property>
        <Property>
          <ID>93</ID>
          <Value>42181,7637193287</Value>
        </Property>
        <Property>
          <ID>50</ID>
          <Value>AceStream (ACE-FFMPEG) + HW Acceleration</Value>
        </Property>
        <Property>
          <ID>42</ID>
          <Value>3</Value>
        </Property>
      </Properties>
      <ChildItems>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>5ac45198-dbe3-4c8a-b5cb-46047cd7981e</ItemID>
          <ItemPath>http://torrent-tv.ru/films.php</ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Главная</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>5ac45198-dbe3-4c8a-b5cb-46047cd7981e</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7652742824</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,7733097685</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>1c9b6217-09c5-489c-8d77-334901c49e22</ItemID>
          <ItemPath>http://torrent-tv.ru/film_selector.php?new&amp;sort_type=date</ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Новинки</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>1c9b6217-09c5-489c-8d77-334901c49e22</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7672834722</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,8033723264</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>15a3cf0d-ff14-4d2f-936e-c2b7b4c10f07</ItemID>
          <ItemPath>http://torrent-tv.ru/film_selector.php?serials&amp;sort_type=date</ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Сериалы</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>15a3cf0d-ff14-4d2f-936e-c2b7b4c10f07</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7681074653</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,8029737963</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>84d981ac-af37-4dc6-aa7f-cce1d4bcb4f3</ItemID>
          <ItemPath>http://torrent-tv.ru/film_selector.php?last_added</ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Последние фильмы</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>84d981ac-af37-4dc6-aa7f-cce1d4bcb4f3</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7694552431</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,7864677083</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>0de5a602-e8da-42f7-b746-712f10e53db5</ItemID>
          <ItemPath>http://torrent-tv.ru/film_selector.php?specific=1080&amp;sort_type=date</ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Фильмы 1080</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>0de5a602-e8da-42f7-b746-712f10e53db5</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7721687963</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,8025470486</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>8b1a06a8-906c-42c8-9885-1bd356b86682</ItemID>
          <ItemPath>http://torrent-tv.ru/film_selector.php?specific=hd&amp;sort_type=date</ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Фильмы 720</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>8b1a06a8-906c-42c8-9885-1bd356b86682</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7728997801</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,8020372685</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>53</ClassID>
          <ItemID>67caf764-c4eb-4f6c-8f98-9b7d4b33aa9e</ItemID>
          <ItemPath>http://torrent-tv.ru/film_selector.php?specific=3d&amp;sort_type=date</ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value>Фильмы 3D</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>67caf764-c4eb-4f6c-8f98-9b7d4b33aa9e</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7767627083</Value>
            </Property>
            <Property>
              <ID>525</ID>
              <Value>42195,801579919</Value>
            </Property>
          </Properties>
        </Item>
        <Item>
          <ClassID>51</ClassID>
          <ItemID>28cbf1d9-383a-4903-bd43-ec8420e68634</ItemID>
          <ItemPath></ItemPath>
          <ParentID>5c35b398-8e05-4ed9-ba01-76268c2e1197</ParentID>
          <Properties>
            <Property>
              <ID>515</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>512</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>532</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>700</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>553</ID>
              <Value>2</Value>
            </Property>
            <Property>
              <ID>42</ID>
              <Value>3</Value>
            </Property>
            <Property>
              <ID>4</ID>
              <Value> Категории</Value>
            </Property>
            <Property>
              <ID>701</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>702</ID>
              <Value>-1</Value>
            </Property>
            <Property>
              <ID>517</ID>
              <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
            </Property>
            <Property>
              <ID>518</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>522</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>570</ID>
              <Value>0</Value>
            </Property>
            <Property>
              <ID>245</ID>
              <Value>28cbf1d9-383a-4903-bd43-ec8420e68634</Value>
            </Property>
            <Property>
              <ID>93</ID>
              <Value>42181,7843086458</Value>
            </Property>
          </Properties>
          <ChildItems>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>5ce7d6ec-d1d6-44e0-a62d-b80e675bc9f5</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=293&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Аниме</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>5ce7d6ec-d1d6-44e0-a62d-b80e675bc9f5</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7846729282</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,7847406019</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>376ca783-2b11-43f9-9832-e020df5eb6cb</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=306&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Биография</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>376ca783-2b11-43f9-9832-e020df5eb6cb</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,786460706</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,7865255556</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>7daa60dc-ca37-4b43-a178-91b89d977751</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=279&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Боевик</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>7daa60dc-ca37-4b43-a178-91b89d977751</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7926891898</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,7927817361</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>ab401b7f-81ab-41aa-95db-3d8c85466746</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=326&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Вестерн</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>ab401b7f-81ab-41aa-95db-3d8c85466746</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7938823958</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,7939404282</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>cb0d0ed9-d453-43cc-9105-50a3a4d4fc2d</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=315&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Военный</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>cb0d0ed9-d453-43cc-9105-50a3a4d4fc2d</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7944740278</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,7945553588</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>ebe82366-bdf9-4676-a60c-ee95a9b425c3</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=313&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Детектив</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>ebe82366-bdf9-4676-a60c-ee95a9b425c3</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7964300579</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,7965071528</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>aeb6b1a6-7597-46f2-9d3f-075f39669c50</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=308&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Детский</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>aeb6b1a6-7597-46f2-9d3f-075f39669c50</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7971980787</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,7972696643</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>2eea7b3e-82a9-4e2b-b06d-355abfbf5c8f</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=314&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>XXX</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>2eea7b3e-82a9-4e2b-b06d-355abfbf5c8f</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7977198148</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42182,3243817477</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>ed444744-0333-4bd9-828e-a9a2ac9fca09</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=275&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Документальный</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>ed444744-0333-4bd9-828e-a9a2ac9fca09</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,7984283218</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42195,787177419</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>7f8d4c18-a6a4-4bfe-867f-4dd38a9bbea1</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=278&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Драма</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>7f8d4c18-a6a4-4bfe-867f-4dd38a9bbea1</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,80340125</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8042588889</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>d053af0f-0929-483d-bf09-eff4accd09e3</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=331&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Игра</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>d053af0f-0929-483d-bf09-eff4accd09e3</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8040247222</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8042588889</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>e26015aa-a302-464e-8e0c-73fc9d0bbdbe</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=319&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>История</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>e26015aa-a302-464e-8e0c-73fc9d0bbdbe</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8046012153</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8046601852</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>9a0c586d-e873-4000-b293-49412d05ea7c</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=282&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Комедия</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>9a0c586d-e873-4000-b293-49412d05ea7c</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42185,8408811111</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8084392014</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>e847bab3-879f-4666-8f93-65233b4d0985</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=298&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Концерт</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>e847bab3-879f-4666-8f93-65233b4d0985</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8095269907</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8097984491</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>c8248eaa-3a1c-4555-bbfd-0295cf1fd700</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=286&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Короткометражка</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>c8248eaa-3a1c-4555-bbfd-0295cf1fd700</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,810422338</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,810492581</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>4c051f60-320d-4a05-b62a-95d8fa9784b0</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=283&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Криминал</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>4c051f60-320d-4a05-b62a-95d8fa9784b0</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8135283449</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8136261806</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>8dda60cf-8803-4f48-9658-d95381d6a64a</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=296&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Мелодрама</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>8dda60cf-8803-4f48-9658-d95381d6a64a</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8145252431</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8146187731</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>c235a50a-f51d-46b0-a973-598e9b233ad0</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=302&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Музыка</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>c235a50a-f51d-46b0-a973-598e9b233ad0</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,815244919</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8153160301</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>56b2011e-ec7c-417d-9897-951cfd02957f</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=291&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Мультфильмы</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>56b2011e-ec7c-417d-9897-951cfd02957f</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8159469792</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8160173611</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>d7c58a2a-0543-4b1e-ab34-2130ad23a8af</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=311&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Мюзикл</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>d7c58a2a-0543-4b1e-ab34-2130ad23a8af</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8167418171</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,817185081</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>974c2ebe-91b3-463c-a1ec-5791e8dab8b8</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=304&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Новости</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>974c2ebe-91b3-463c-a1ec-5791e8dab8b8</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8177370023</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8178134375</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>6efc6306-616d-4bc0-a1ed-6615ecebd38a</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=294&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Приключения</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>6efc6306-616d-4bc0-a1ed-6615ecebd38a</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8183569213</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8184333912</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>6b7ca9c1-f6c3-4da5-8a6f-993ffa235a0b</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=309&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Реальное ТВ</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>6b7ca9c1-f6c3-4da5-8a6f-993ffa235a0b</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8191386574</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42185,8415177083</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>6245cff0-befa-44c7-b67a-5b9f339b4d18</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=297&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Семейный</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>6245cff0-befa-44c7-b67a-5b9f339b4d18</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8197535301</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8198416204</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>65342193-143d-4575-a24c-53ab356648a3</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=318&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Спорт</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>65342193-143d-4575-a24c-53ab356648a3</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8202522569</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8203032292</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>bd642bad-53a5-4ae5-91b5-3df44c78ebea</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=324&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Ток-шоу</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>bd642bad-53a5-4ae5-91b5-3df44c78ebea</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8213258218</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8213863194</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>6e06a682-3690-433f-b9d9-52eee1f48769</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=280&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Триллер</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>6e06a682-3690-433f-b9d9-52eee1f48769</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,825048206</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42195,9203494676</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>de546538-ad52-4de9-820a-a5c40e157e5e</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=289&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Ужасы</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>de546538-ad52-4de9-820a-a5c40e157e5e</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8258326968</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42193,6973124306</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>a53af94a-2949-4499-be44-f4b321bc87de</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=284&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Фантастика</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>a53af94a-2949-4499-be44-f4b321bc87de</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8272954977</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42191,9415153009</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>261c6cc4-6552-405e-89c6-20c3ac4a7340</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=336&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Фильм-Нуар</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>261c6cc4-6552-405e-89c6-20c3ac4a7340</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8286096991</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42182,8788921991</Value>
                </Property>
              </Properties>
            </Item>
            <Item>
              <ClassID>53</ClassID>
              <ItemID>b62e88d2-fd51-4176-909f-6ac69d9ef3a4</ItemID>
              <ItemPath>http://torrent-tv.ru/film_selector.php?genre=301&amp;sort_type=date</ItemPath>
              <ParentID>28cbf1d9-383a-4903-bd43-ec8420e68634</ParentID>
              <Properties>
                <Property>
                  <ID>515</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>512</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>532</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>700</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>553</ID>
                  <Value>2</Value>
                </Property>
                <Property>
                  <ID>42</ID>
                  <Value>3</Value>
                </Property>
                <Property>
                  <ID>4</ID>
                  <Value>Фэнтези</Value>
                </Property>
                <Property>
                  <ID>701</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>702</ID>
                  <Value>-1</Value>
                </Property>
                <Property>
                  <ID>517</ID>
                  <Value>578-720,722-1080,482-576,402-480,322-400,202-320,0-200</Value>
                </Property>
                <Property>
                  <ID>518</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>522</ID>
                  <Value>0</Value>
                </Property>
                <Property>
                  <ID>245</ID>
                  <Value>b62e88d2-fd51-4176-909f-6ac69d9ef3a4</Value>
                </Property>
                <Property>
                  <ID>93</ID>
                  <Value>42181,8295659144</Value>
                </Property>
                <Property>
                  <ID>525</ID>
                  <Value>42181,8296374884</Value>
                </Property>
              </Properties>
            </Item>
          </ChildItems>
        </Item>
      </ChildItems>
      <HmsTranscodingConfig>
        <TranscoderList>
          <Transcoder>
            <Name>HMSMPEG</Name>
            <Path>hmsmpeg.exe</Path>
            <HomePage>http://www.ffmpeg.org/</HomePage>
            <Download></Download>
          </Transcoder>
          <Transcoder>
            <Name>HmsMPEG</Name>
            <Path>Hmsmpeg.exe</Path>
            <HomePage>http://www.ffmpeg.org/</HomePage>
            <Download></Download>
          </Transcoder>
          <Transcoder>
            <Name>hmsMPEG</Name>
            <Path>hmsmpeg.exe</Path>
            <HomePage>http://www.ffmpeg.org/</HomePage>
            <Download></Download>
          </Transcoder>
        </TranscoderList>
        <TranscodingProfileList>
          <Profile>
            <TranscoderName>HMSMPEG</TranscoderName>
            <TranscodingCondition></TranscodingCondition>
            <TranscodingConditionSyntaxType>PascalScript</TranscodingConditionSyntaxType>
            <TranscodingComment></TranscodingComment>
            <TranscodingFolder>Транскодирование для TorrentStream, AceStream медиа-ресурсов</TranscodingFolder>
            <TranscodingMediaType>3</TranscodingMediaType>
            <TranscodingMimeType></TranscodingMimeType>
            <TranscodingMimeTypeScript>cfgTranscodingVideoMimeType</TranscodingMimeTypeScript>
            <TranscodingMimeTypeSyntaxType>PascalScript</TranscodingMimeTypeSyntaxType>
            <TranscodingMode>1</TranscodingMode>
            <TranscodingParams>const
  csVlcParams = &apos;-Idummy --language en vlc://pause:2 --demuxdump-file="%s" --access=p2p_access "%s" :demux=dump&apos;;// --extraintf=logger --verbose=2 --logfile=D:\vlc.log --logmode=text --file-logging&apos;;  
var
  sFileType, sInputFileName, sMediaResourceLink, sReadPipeName, sWritePipeName, sTranscodingParams: string;    
begin
  TranscodingResult := False;
  sInputFileName := InputFileName;
  if sInputFileName = &apos;-&apos; then begin
    sMediaResourceLink := HmsGetItemProperty(mpiMediaResourceLink);
    if Pos(&apos;--demuxdump-file&apos;, sMediaResourceLink) &gt; 0 then begin
      if not HmsRegExMatch(&apos;--access=p2p_access "(.*?)"&apos;, sMediaResourceLink, sInputFileName) then 
        HmsRegExMatch(&apos;"(.*?\.torrent)"&apos;, sMediaResourceLink, sInputFileName)
     end    
  end;      
  if HmsCreateDualPipe(sReadPipeName, sWritePipeName) then begin
    if HmsTranscodingExecute(&apos;ACEPLAYER&apos;, Format(csVlcParams, [sWritePipeName, sInputFileName]), False) then begin    
      if mpFileType &lt;&gt; &apos;&apos; then      
        sFileType := &apos;-f "&apos; + mpFileType + &apos;" &apos;
      else                          
        sFileType := &apos;&apos;;
      mpInternetItem := False;
      sTranscodingParams := &apos;-hwaccel auto &apos;+HmsTranscodingProfileParams(&apos;Фильмы (основной)&apos;);
      sTranscodingParams := ReplaceStr(sTranscodingParams, &apos;&lt;HMSMPEG&gt; &apos;, sFileType);          
      sTranscodingParams := ReplaceStr(sTranscodingParams, &apos;&lt;INPUT FILE&gt;&apos;, sReadPipeName);      
      sTranscodingParams := sTranscodingParams + &apos; "&apos; + OutputFileName + &apos;"&apos;;
      TranscodingResult := HmsTranscodingExecute(&apos;HMSMPEG&apos;, sTranscodingParams, True)          
    end 
  end 
end.</TranscodingParams>
            <TranscodingParamsSyntaxType>PascalScript</TranscodingParamsSyntaxType>
            <TranscodingProfile>AceStream (ACE-FFMPEG) + HW Acceleration</TranscodingProfile>
            <TranscodingProfileActive>-1</TranscodingProfileActive>
            <TranscodingProfilePriority>13</TranscodingProfilePriority>
            <TranscodingProfileUuid>ffd1f246-3e71-49f6-b08b-b7611e2f7b09</TranscodingProfileUuid>
          </Profile>
        </TranscodingProfileList>
      </HmsTranscodingConfig>
    </Item>
  </ChildItems>
  <HmsTranscodingConfig>
    <TranscoderList>
      <Transcoder>
        <Name>HMSMPEG</Name>
        <Path>hmsmpeg.exe</Path>
        <HomePage>http://www.ffmpeg.org/</HomePage>
        <Download></Download>
      </Transcoder>
      <Transcoder>
        <Name>HmsMPEG</Name>
        <Path>Hmsmpeg.exe</Path>
        <HomePage>http://www.ffmpeg.org/</HomePage>
        <Download></Download>
      </Transcoder>
      <Transcoder>
        <Name>hmsMPEG</Name>
        <Path>hmsmpeg.exe</Path>
        <HomePage>http://www.ffmpeg.org/</HomePage>
        <Download></Download>
      </Transcoder>
    </TranscoderList>
    <TranscodingProfileList>
      <Profile>
        <TranscoderName>HMSMPEG</TranscoderName>
        <TranscodingCondition></TranscodingCondition>
        <TranscodingConditionSyntaxType>PascalScript</TranscodingConditionSyntaxType>
        <TranscodingComment></TranscodingComment>
        <TranscodingFolder>Транскодирование без перекодирования видео</TranscodingFolder>
        <TranscodingMediaType>3</TranscodingMediaType>
        <TranscodingMimeType></TranscodingMimeType>
        <TranscodingMimeTypeScript>begin
  if SameText(cfgTranscodingFileFormat, &apos;MPEG (DVD)&apos;) then
    FileExt := &apos;mpg&apos;
  else if Pos(&apos;MPEGTS&apos;, cfgTranscodingFileFormat) &gt; 0 then
    FileExt := &apos;ts&apos;
  else if Pos(&apos;ASF&apos;, cfgTranscodingFileFormat) &gt; 0 then
    FileExt := &apos;wmv&apos;
  else if SameText(cfgTranscodingFileFormat, &apos;MP4&apos;) then
    FileExt := &apos;mp4&apos;
  else if SameText(cfgTranscodingFileFormat, &apos;MPEG1&apos;) then
    FileExt := &apos;mpeg&apos;
  else if SameText(cfgTranscodingFileFormat, &apos;FLV&apos;) then
    FileExt := &apos;flv&apos;
  else
    FileExt := &apos;&apos;;    
  if FileExt &lt;&gt; &apos;&apos; then
    MimeType := HmsGetMimeType(FileExt)    
  else            
    MimeType := &apos;&apos;
end.</TranscodingMimeTypeScript>
        <TranscodingMimeTypeSyntaxType>PascalScript</TranscodingMimeTypeSyntaxType>
        <TranscodingMode>1</TranscodingMode>
        <TranscodingParams>const
  csFFMpegVideoParams = &apos; -vcodec %s %s%s -pix_fmt yuv420p&apos;;
  csFFMpegAudioParams = &apos; -acodec %s -ab %d -ar %d -ac %d&apos;;  

procedure GetAudioTranscodingParams(const aAudioCodec: string; 
    var aCodecName, aFileFormat: string; var aCodecID, aAudioBitrate, aAudioChannels: Integer);
begin
  aAudioBitrate := cfgTranscodingAudioBitrate;  
  if (cfgTranscodingAudioChannels &lt;&gt; 0) then  
    aAudioChannels := cfgTranscodingAudioChannels;
  if SameText(aAudioCodec, &apos;AAC&apos;) then begin
    aCodecName  := &apos;libfaac&apos;;    
    aFileFormat := &apos;adts&apos;;
    aCodecID    := CODEC_ID_AAC; 
  end else if SameText(aAudioCodec, &apos;MP3&apos;) then begin
    aCodecName  := &apos;libmp3lame&apos;;    
    aFileFormat := &apos;mp3&apos;;
    aCodecID    := CODEC_ID_MP3;
    if aAudioBitrate &gt; 320000 then
      aAudioBitrate := 320000;
    if aAudioChannels &gt; 2 then
      aAudioChannels := 2;      
  end else if SameText(aAudioCodec, &apos;MP2&apos;) then begin  
    aCodecName  := &apos;mp2&apos;;    
    aFileFormat := &apos;mp2&apos;;
    aCodecID    := CODEC_ID_MP2;
    if aAudioBitrate &gt; 320000 then
      aAudioBitrate := 320000;      
    if aAudioChannels &gt; 2 then
      aAudioChannels := 2;      
  end else if SameText(aAudioCodec, &apos;LPCM&apos;) then begin  
    aCodecName  := &apos;pcm_s16be&apos;;    
    aFileFormat := &apos;s16be&apos;;
    aCodecID    := CODEC_ID_PCM_BLURAY;
  end else if SameText(aAudioCodec, &apos;DTS&apos;) then begin  
    aCodecName  := &apos;dca&apos;;    
    aFileFormat := &apos;dts&apos;;
    aCodecID    := CODEC_ID_DTS;
    aAudioChannels := 0    
  end else if SameText(aAudioCodec, &apos;WMA&apos;) then begin  
    aCodecName  := &apos;wmav2&apos;;    
    aFileFormat := &apos;asf&apos;;
    aCodecID    := CODEC_ID_WMAV2;    
    if aAudioChannels &gt; 2 then
      aAudioChannels := 2;      
  end else begin
    aCodecName  := &apos;ac3&apos;;    
    aFileFormat := &apos;ac3&apos;;    
    if SameText(aAudioCodec, &apos;AC3&apos;) then
      aCodecID := CODEC_ID_AC3
    else                          
      aCodecID := CODEC_ID_NONE;
  end  
end;

function GetFileFormat(const aFileFormat: string): string;
begin
  if (aFileFormat = &apos;&apos;) or SameText(aFileFormat, &apos;MPEG (DVD)&apos;) then
    Result := &apos;dvd&apos;
  else if Pos(&apos;MPEGTS&apos;, aFileFormat) &gt; 0 then
    Result := &apos;mpegts&apos;
  else if Pos(&apos;ASF&apos;, aFileFormat) &gt; 0 then
    Result := &apos;asf&apos;
  else if SameText(aFileFormat, &apos;MP4&apos;) then
    Result := &apos;ipod&apos;    
  else if SameText(aFileFormat, &apos;FLV&apos;) then
    Result := &apos;flv&apos;
  else if SameText(aFileFormat, &apos;MPEG1&apos;) then
    Result := &apos;mpeg&apos;
  else
    Result := aFileFormat
end;

function GetVideoCodec(const aVideoCodec: string): string;
begin
  if (aVideoCodec = &apos;&apos;) or SameText(aVideoCodec, &apos;MPEG2&apos;) then
    Result := &apos;mpeg2video&apos;
  else if SameText(aVideoCodec, &apos;MPEG1&apos;) then
    Result := &apos;mpeg1video&apos;    
  else if SameText(aVideoCodec, &apos;FLV&apos;) then
    Result := &apos;flv&apos;
  else if SameText(aVideoCodec, &apos;WMV&apos;) then
    Result := &apos;wmv2&apos;
  else if SameText(aVideoCodec, &apos;MPEG4&apos;) then
    Result := &apos;mpeg4&apos;
  else if SameText(aVideoCodec, &apos;X264&apos;) then
    Result := &apos;libx264 -x264opts "fast-pskip=1:rc-lookahead=0:aq_mode=0" -partitions none -sc_threshold 0 -trellis 0 -me_method dia -refs 1 -subq 0 -vprofile baseline -level 30 -bufsize 10000000 &apos;
  else
    Result := aVideoCodec
end;

function GetMultiThreadSupported(const aVideoCodec: string): Boolean;
begin
  Result := not MatchText(aVideoCodec, [&apos;WMV&apos;, &apos;MPEG1&apos;, &apos;FLV&apos;])
end;

function GetAudioBitrate(const aAudioCodec: string; aAudioBitrate: Integer): Integer;
begin
  if MatchText(aAudioCodec, [&apos;MP2&apos;, &apos;MP3&apos;]) and (aAudioBitrate &gt; 320000) then
    Result := 320000
  else
    Result := aAudioBitrate
end;

function GetAudioSampleRate(const aFileFormat, aAudioCodec: string): Integer;
begin
  if MatchText(aFileFormat, [&apos;FLV&apos;]) and not SameText(aAudioCodec, &apos;AAC&apos;) then  
    Result := 44100
  else
    Result := 48000
end;

function GetAudioChannels(const aAudioCodec: string; aConfigAudioChannels, aStreamAudioChannels: Integer): Integer;
begin
  if aConfigAudioChannels &gt; 0 then
    Result := aConfigAudioChannels
  else
    Result := aStreamAudioChannels;
  if (Result &gt; 2) and MatchText(aAudioCodec, [&apos;MP2&apos;, &apos;MP3&apos;]) then
    Result := 2
  else if (Result = 1) and MatchText(aAudioCodec, [&apos;AAC&apos;, &apos;AC3&apos;]) then
    Result := 2
  else if Result &gt; 6 then
    Result := 6
end;

function VideoCodecCompatible: Boolean;
begin
  if (cfgTranscodingFileFormat = &apos;&apos;) or SameText(cfgTranscodingFileFormat, &apos;MPEG (DVD)&apos;) then
    Result := MatchText(mpVideoCodec, [&apos;MPEG2VIDEO&apos;, &apos;MPEG1VIDEO&apos;])
  else if Pos(&apos;MPEGTS&apos;, cfgTranscodingFileFormat) &gt; 0 then
    Result := MatchText(mpVideoCodec, [&apos;H264&apos;, &apos;MPEG2VIDEO&apos;, &apos;MPEG1VIDEO&apos;, &apos;MPEG4&apos;])
  else if Pos(&apos;ASF&apos;, cfgTranscodingFileFormat) &gt; 0 then
    Result := MatchText(mpVideoCodec, [&apos;H264&apos;, &apos;MPEG4&apos;, &apos;WMV2&apos;])
  else if SameText(cfgTranscodingFileFormat, &apos;MP4&apos;) then
    Result := MatchText(mpVideoCodec, [&apos;H264&apos;, &apos;MPEG4&apos;])    
  else if SameText(cfgTranscodingFileFormat, &apos;FLV&apos;) then
    Result := MatchText(mpVideoCodec, [&apos;H264&apos;, &apos;FLV&apos;])
  else if SameText(cfgTranscodingFileFormat, &apos;MPEG1&apos;) then
    Result := MatchText(mpVideoCodec, [&apos;MPEG2VIDEO&apos;, &apos;MPEG1VIDEO&apos;])
  else
    Result := False
end;

procedure AddFilterParams(var aFilterParams: string; const aAddParams: string);
begin
  if aFilterParams &lt;&gt; &apos;&apos; then
    aFilterParams := aFilterParams + &apos;,&apos;;
  aFilterParams := aFilterParams + aAddParams
end;
  
var
  bMapStreams, bDeinterlace, bh264_mp4toannexb, bPipe, bSuccess, bAudioTranscoding, bVideoTranscoding: Boolean;
  iAudioBitrate, iAudioChannels, iAudioCfgBitrate, iAudioCfgCodecID, iAudioStreamNo, 
  iCodecID, iFrameWidth, iFrameHeight, iWidth, iHeight, 
  iPadLeft, iPadTop, iPadRight, iPadBottom, iVideoCodecID, iAudioCodecID: Integer;  
  sVideoTranscodingParams, sAudioTranscodingParams, sTranscodingParams,
  sAudioCfgCodecName, sAudioCfgFileFormat, sInputAudioFileName, 
  sInputVideoFileName, sFrameRate, sResourcePipe, sSoxTranscodingParams, 
  sVideoBitrate, sVideoMinMaxRate, sFilterParams, sPadParams: string;
begin
  if HmsGetStreamCount = 0 then  
    HmsRetrieveProperties;
  bPipe := Pos(&apos;\\.\pipe\&apos;, InputFileName) &gt; 0;    
  bDeinterlace := SameText(HmsGetVideoSettings(vstDeinterlace), &apos;on&apos;);                                
  if bPipe then                 
            
  else if (mpIsoItem or mpDvdItem or mpBdItem) and HmsCreateResourcePipe(sResourcePipe) then begin
    InputFileName := sResourcePipe;      
    bPipe := True;      
  end else if mpPodcastItem then begin
    InputFileName := HmsGetItemProperty(mpiMediaResourceSource);
    bPipe := Pos(&apos;\\.\pipe\&apos;, InputFileName) &gt; 0;
  end;        
  bVideoTranscoding := False;      
  bAudioTranscoding := False;    
  sInputVideoFileName := InputFileName;
  sInputAudioFileName := InputFileName;
  iAudioStreamNo := mpAudioStreamNo;
  if iAudioStreamNo &lt; 0 then
    iAudioStreamNo := 0;      
  iVideoCodecID  := HmsGetStreamCodecID(stVideo, 0);  
  iAudioCodecID  := HmsGetStreamCodecID(stAudio, iAudioStreamNo);      
  iAudioChannels := HmsGetStreamChannels(iAudioStreamNo);    
  if iAudioChannels &lt; 2 then iAudioChannels := 2;  
  iAudioBitrate  := HmsGetStreamBitrate(stAudio, iAudioStreamNo);
  sTranscodingParams := &apos;&apos;; sSoxTranscodingParams := &apos;&apos;;
  bVideoTranscoding := False;    
  bAudioTranscoding := False;
  if SameText(HmsGetVideoSettings(vstVideoOriginal), &apos;On&apos;) then
    bVideoTranscoding := False    
  else if SameText(HmsGetVideoSettings(vstVideoOriginal), &apos;Off&apos;) then    
    bVideoTranscoding := True 
  else if (mpSubtitleLanguage &lt;&gt; &apos;&apos;) or (HmsGetVideoSettings(vstSubtitle) &lt;&gt; &apos;&apos;) or bDeinterlace then    
    bVideoTranscoding := True     
  else if (mpFrameRate &gt; 0) and (mpFrameRate &lt; 20) then
    bVideoTranscoding := True      
  else if not VideoCodecCompatible then
    bVideoTranscoding := True
  else begin        
    if (mpOriginalWidth &gt; 0) then begin    
      iWidth  := mpOriginalWidth;      
      iHeight := mpOriginalHeight;
    end else begin    
      iWidth  := mpWidth;      
      iHeight := mpHeight;
    end;               
    if (iWidth &gt; cfgMaximumVideoResolutionWidth) or (iHeight &gt; cfgMaximumVideoResolutionHeight) then
      bVideoTranscoding := True  
  end;        
  GetAudioTranscodingParams(cfgTranscodingAudioCodec, sAudioCfgCodecName,
          sAudioCfgFileFormat, iAudioCfgCodecID, iAudioCfgBitrate, iAudioChannels);      
  if SameText(HmsGetVideoSettings(vstAudioOriginal), &apos;On&apos;) then
    bAudioTranscoding := False    
  else if SameText(HmsGetVideoSettings(vstAudioOriginal), &apos;Off&apos;) then    
    bAudioTranscoding := True
  else if (iAudioCodecID &lt;&gt; iAudioCfgCodecID) or 
       ((cfgTranscodingAudioChannels &lt;&gt; 0) and (cfgTranscodingAudioChannels &lt;&gt; iAudioChannels)) or
       ((cfgTranscodingFileFormat = &apos;FLV&apos;) and 
         (GetAudioSampleRate(cfgTranscodingFileFormat, cfgTranscodingAudioCodec) &lt;&gt; mpAudioSampleRate)) then
    bAudioTranscoding := True;              
  if bVideoTranscoding then begin
    sVideoMinMaxRate := &apos;&apos;;         
    if cfgTranscodingVideoBitrate &gt; 0 then begin  
      sVideoBitrate := &apos;-b:v &apos; + IntToStr(cfgTranscodingVideoBitrate);
      if cfgTranscodingVideoMinMaxRate then
        sVideoMinMaxRate := Format(&apos; -minrate %d -maxrate %d -bufsize %d&apos;,
                    [cfgTranscodingVideoBitrate, cfgTranscodingVideoBitrate, 
                     HmsTranscodingBufferSize(cfgTranscodingVideoBitrate)])
    end else
      sVideoBitrate := &apos;-q:v 0&apos;;
    sVideoTranscodingParams := Format(csFFMPegVideoParams, 
            [GetVideoCodec(cfgTranscodingVideoCodec), sVideoBitrate,
                           sVideoMinMaxRate]);
    sFrameRate := HmsGetVideoSettings(vstFrameRate);
    if sFrameRate = &apos;&apos; then    
      sFrameRate := cfgTranscodingFrameRate;
    if sFrameRate = &apos;&apos; then begin
      if SameText(cfgTranscodingVideoCodec, &apos;FLV&apos;) then      
        sFrameRate := FormatFloat(&apos;0&apos;, mpFrameRate)
      else if (mpFrameRate &gt; 0) and (mpFrameRate &lt; 20) then 
        sFrameRate := &apos;23.976&apos;
    end;          
    if sFrameRate &lt;&gt; &apos;&apos; then
      sVideoTranscodingParams := sVideoTranscodingParams + &apos; -r &apos; + sFrameRate;
    iWidth := mpWidth; iHeight := mpHeight;  
    if (iWidth &gt; 0) and (iHeight &gt; 0) then begin
      sFilterParams := &apos;&apos;; sPadParams := &apos;&apos;;    
      if HmsTranscodingFrameParams(iWidth, iHeight, cfgTranscodingScreenFormat,
                         iPadLeft, iPadTop, iPadRight, iPadBottom) then begin                         
        if mp3DVideoType in [1, 2] then begin
          iWidth  := iWidth  + iPadLeft + iPadRight;
          iHeight := iHeight + iPadTop + iPadBottom;                 
          if mp3DVideoType = 1 then
            iWidth  := (iWidth div 4) * 4
          else
            iHeight := (iHeight div 4) * 4          
        end;
        iFrameWidth  := iWidth;
        iFrameHeight := iHeight;
        if (mp3DVideoType = 0) and ((iPadLeft &gt; 0) or (iPadRight &gt; 0) or (iPadTop &gt; 0) or (iPadBottom &gt; 0)) then begin        
          Inc(iFrameWidth,  iPadLeft + iPadRight);
          Inc(iFrameHeight, iPadTop + iPadBottom);
          sPadParams := Format(&apos;pad=%d:%d:%d:%d:0x%s&apos;,
                        [iFrameWidth, iFrameHeight, iPadLeft, iPadTop, HmsConvertColor(cfgTranscodingPadColor)]);
          if cfgTranscodingFrameExists then
            sVideoTranscodingParams := sVideoTranscodingParams + cfgTranscodingFrameParams;
        end
      end else begin
        iFrameWidth  := iWidth;
        iFrameHeight := iHeight;
      end;
      AddFilterParams(sFilterParams, Format(&apos;scale=%d:%d&apos;, [iWidth, iHeight]));
      if sPadParams &lt;&gt; &apos;&apos; then AddFilterParams(sFilterParams, sPadParams);
      AddFilterParams(sFilterParams, &apos;setdar=&apos; + cfgTranscodingAspectRatio);
      sVideoTranscodingParams := sVideoTranscodingParams + Format(&apos; -vf "%s"&apos;, [sFilterParams]);
      sVideoTranscodingParams := sVideoTranscodingParams + HmsTranscodingSubTitleParams(
         iFrameWidth, iFrameHeight, iWidth, iHeight, iPadLeft, iPadTop);
      if (cfgTranscodingThreadCount &gt; 1) and GetMultiThreadSupported(cfgTranscodingVideoCodec) then
        sVideoTranscodingParams := sVideoTranscodingParams + &apos; -threads &apos; + IntToStr(cfgTranscodingThreadCount);
    end    
  end else begin  
    sVideoTranscodingParams := &apos; -copyinkf -vcodec copy &apos;;
    if SameText(mpVideoCodec, &apos;H264&apos;) then begin    
      if VarToStr(mpCodecNalLengthSize) &lt;&gt; &apos;&apos; then      
        bh264_mp4toannexb := VarToStr(mpCodecNalLengthSize) &lt;&gt; &apos;0&apos;        
      else                         
        bh264_mp4toannexb := not MatchText(mpFileType, [&apos;mpegts&apos;, &apos;wtv&apos;, &apos;hls&apos;, &apos;applehttp&apos;], True);        
      if bh264_mp4toannexb then
        sVideoTranscodingParams := sVideoTranscodingParams + &apos; -vbsf h264_mp4toannexb&apos;
    end        
  end;                 
  if bAudioTranscoding then  
    sAudioTranscodingParams := Format(csFFMpegAudioParams, [sAudioCfgCodecName, iAudioCfgBitrate, 
        GetAudioSampleRate(cfgTranscodingFileFormat, cfgTranscodingAudioCodec), iAudioChannels])
  else                   
    sAudioTranscodingParams := &apos; -acodec copy&apos;;     
  bMapStreams := HmsGetStreamCount &gt; 0;
  sTranscodingParams := HmsTranscodingProbeParams;
  if mpTimeStart &lt;&gt; &apos;&apos; then
    sTranscodingParams := sTranscodingParams + &apos;-ss &apos; + mpTimeStart + &apos; &apos;;
  if SameText(mpFileType, &apos;mpeg&apos;) then                            
    sTranscodingParams := sTranscodingParams + &apos;-f mpeg &apos;;    
  sTranscodingParams := sTranscodingParams + Format(&apos;-i "%s" &apos;, [InputFileName]);
  sTranscodingParams := sTranscodingParams + &apos;-f &apos; + GetFileFormat(cfgTranscodingFileFormat);
  sTranscodingParams := sTranscodingParams + sVideoTranscodingParams + sAudioTranscodingParams;                                   
  if bMapStreams then                           
    sTranscodingParams := sTranscodingParams + Format(&apos; -map 0:%d -map 0:%d&apos;, [HmsGetStreamIndex(stVideo, 0), HmsGetStreamIndex(stAudio, iAudioStreamNo)]);
  sTranscodingParams := sTranscodingParams + &apos; "&lt;OUTPUT FILE&gt;"&apos;;  
//  TranscodingParams := sTranscodingParams;
  TranscodingResult := HmsTranscodingExecute(&apos;HMSMPEG&apos;, sTranscodingParams, True, InputFileName, OutputFileName)                       
end.</TranscodingParams>
        <TranscodingParamsSyntaxType>PascalScript</TranscodingParamsSyntaxType>
        <TranscodingProfile>Фильмы (Ремуксирование)</TranscodingProfile>
        <TranscodingProfileActive>-1</TranscodingProfileActive>
        <TranscodingProfilePriority>6</TranscodingProfilePriority>
        <TranscodingProfileUuid>6d153a01-6207-4503-8a0f-6b4cf722e95e</TranscodingProfileUuid>
      </Profile>
    </TranscodingProfileList>
  </HmsTranscodingConfig>
</HmsMediaItem>
