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->live = $lives->select($this->get["id"]); $videos = $videos->select_all_by_live_id($this->live["id"]); $this->set("live", $this->live); $this->set("videos", $videos); } $this->render(); }
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(); }
function run() { $lives = new Model_lives(); $this->set("lives", $lives->select_all()); $this->render(); }
function get_live() { $lives = new Model_lives(); $this->live = $lives->select($this->video['liveId']); }
function run() { $lives = new Model_lives(); $this->set("lives", $lives->select_all_not_downloaded()); $this->render(); }
function submit() { $lives = new Model_lives(); $logs = new Model_logs(); $result = $lives->insert_into($this->live_id, $this->live_title); $logs->d("front", "downloader/register: " . $this->live_title); if ($result) { $this->is_success = true; } else { $this->is_success = false; $this->submission_error[] = "放送の登録に失敗しました。"; } return $this->is_success; }