<div class="my_phpWrapper>
PHPCode
<div class="my_rubyWrapper>
RubyCode
<div class="my_sqlWrapper>
SQLCode
</div>
</div>
</div>
$content = '<code lang="php">
PHPCode
<code lang="ruby">
RubyCode
<code lang="sql">
SQLCode
</code>
</code>
</code>';
function getInnerPart($content)
{
$result = "";
$regExpWrapper = "#<code(?:\s+)?lang=\"(.*?)\">(.*)
#is"; $uppodPl = new stdClass();
$uppodPl->playlist = array();
$currentSeason = "";
while($row = $db->get_row($sql))
{
$result = strip_tags(iconv("utf-8" , "windows-1251" , $row['filename']));
$filename = explode("/", $result);
$currentItem = explode("/", $row["filename"]);
$seasonIndex = explode("_", $currentItem0]);
$seasonIndex = $seasonIndex[1];
$episodeIndex = explode(".", $currentItem[1]);
$episodeIndex = explode("_", $episodeIndex[0]);
$episodeIndex = $episodeIndex[1];
if($currentSeason != $seasonIndex)
{
$currentSeason = $seasonIndex;
$seasonContent = new stdClass();
$seasonContent->comment = "Сезон ".$currentSeason;
$seasonContent->playlist = array();
array_push($uppodPl->playlist, $seasonContent);
}
$episodeContent = new stdClass();
$episodeContent->comment = "Серия ".$episodeIndex;
$episodeContent->file = "http://mp4.sitename.com/serials/$dirname/$filename[0]/$filename[1]/index.m3u8";
array_push($uppodPl->playlist[count($uppodPl->playlist) - 1]->playlist, $episodeContent);
}
echo json_encode($uppodPl);
но я формирую название и путь файла с торрента
Из этого трудно понять, что именно не дает Worker`у штатно отработать