<?php

require_once './common.php';
use Ministra\Storage\Lib\TvArchiveRecorder;
use Ministra\Storage\Lib\TvArchiveTasks;
$archive = new \Ministra\Storage\Lib\TvArchiveTasks();
$archive->setApiUrl(\API_URL . 'tv_archive/' . \STORAGE_NAME);
$tasks = $archive->sync();
if (!\is_array($tasks)) {
    return \false;
}
$recorder = new \Ministra\Storage\Lib\TvArchiveRecorder();
echo $recorder->startAll($tasks);
