Ejemplo n.º 1
0
    protected function populate()
    {
        parent::populate();

        $this->file                             = MMSynchFileManager::fromRoot($this->getPublisher(), MMSynchFileManager::AUDIO_FOLDER, $this->source['m_file']);
        $this->content->fields->file            = sprintf('%s||%s', $this->file->getFullPath(), $this->getPublisher()->getFolder());
        $this->content->fields->screen_capture  = MMSynchHelper::binaryToFile($this->source['audio_screen_capture']);
        $this->content->fields->duration        = $this->source['audio_duration'];
    }
Ejemplo n.º 2
0
    protected function populate()
    {
        parent::populate();

        $id = false;
        if ($this->source['video_brightcoveid'] != '')
        {
            $id = $this->source['video_brightcoveid'];
        }

        $filepath = false;
        if ($this->source['m_file'])
        {
            try
            {
                $this->file = MMSynchFileManager::fromRoot($this->getPublisher(), MMSynchFileManager::VIDEO_FOLDER, $this->source['m_file']);
                $filepath = $this->file->getFullPath();
            }
            catch(Exception $e)
            {
                if ($id)
                {
                    MMSynchLog::warning($this, $e->getMessage());
                }
                else
                {
                    throw MMSynchException::fromException($e);
                }
            }
        }

        $this->content->fields->file            = sprintf('%s|%s|%s', $filepath, $id, $this->getPublisher()->getFolder());
        $this->content->fields->screen_capture  = MMSynchHelper::binaryToFile($this->source['video_screen_capture']);
        $this->content->fields->duration        = $this->source['video_duration'];
        $this->content->fields->original_size   = $this->source['video_original_size'];
    }