|
|
|
@ -8,22 +8,26 @@ use App\Http\Controllers\Peertube\Common;
|
|
|
|
|
|
|
|
|
|
class Local extends Common { |
|
|
|
|
private $common; |
|
|
|
|
private $count; |
|
|
|
|
|
|
|
|
|
public function __construct () { |
|
|
|
|
$this->common = new Common; |
|
|
|
|
$this->count = 50; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function index () { |
|
|
|
|
public function index ($page=0) { |
|
|
|
|
$res = [ |
|
|
|
|
'page' => 'videoslist', |
|
|
|
|
'paginate' => $page, |
|
|
|
|
'pagetotal' => 500, |
|
|
|
|
'userinfo' => $this->common->user, |
|
|
|
|
]; |
|
|
|
|
$res['video'] = $this->getVideo(); |
|
|
|
|
$res['video'] = $this->getVideo(($page*$this->count), $this->count); |
|
|
|
|
return view('pages.peertube.videos.local', ['res' => $res]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getVideo () { |
|
|
|
|
$get = $this->ptapi_get('/api/v1/videos/?start=0&count=50&sort=-publishedAt&filter=local&skipCount=true&nsfw=both'); |
|
|
|
|
function getVideo ($start, $count) { |
|
|
|
|
$get = $this->ptapi_get('/api/v1/videos/?start='.$start.'&count='.$count.'&sort=-publishedAt&filter=local&skipCount=true&nsfw=both'); |
|
|
|
|
return $this->vidlist($get); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|