function submit() { $videos = new Model_videos(); $logs = new Model_logs(); $this->clean_files(); $videos->delete($this->video["id"]); $logs->d("front", "live/video/delete: " . $this->video["filename"]); $this->is_success = true; return $this->is_success; }
function run() { $lives = new Model_lives(); $videos = new Model_videos(); $logs = new Model_logs(); $this->set("logs", $logs->select_all()); $this->set("count_lives", $lives->count()); $this->set("count_videos", $videos->count()); $this->set("sum_filesize", $videos->sum_filesize()); $this->render(); }
function submit() { $lives = new Model_lives(); $videos = new Model_videos(); $logs = new Model_logs(); $this->clean_files(); $videos->delete_by_live_id($this->live["id"]); $lives->delete($this->live["id"]); $logs->d("front", "live/delete: " . $this->live["title"]); $this->is_success = true; return $this->is_success; }
function run() { $lives = new Model_lives(); $videos = new Model_videos(); if (isset($this->get["id"])) { $this->video = $videos->select($this->get["id"]); $this->live = $lives->select($this->video["liveId"]); $this->set("video", $this->video); $this->set("live", $this->live); } if (filesize("{$this->config["contents_dir"]}/{$this->video["filename"]}") == 0) { $pathinfo = pathinfo($this->video["filename"]); $json = $this->acd_meta(); if (is_null($json)) { $this->acd_sync(); $json = $this->acd_meta(); } $this->set("video_url", $json["tempLink"] . "?/v." . $pathinfo["extension"]); } else { $video_url = "{$this->config["contents_dir_url"]}/{$this->video["filename"]}"; $this->set("video_url", $video_url); } $this->render(); }