このリポジトリは2023-09-09にアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュ、イシューの作成、プルリクエストはできません。
076server/app/Http/Controllers/Peertube/Videos/Local.php

35 行
927 B
PHP

<?php
namespace App\Http\Controllers\Peertube\Videos;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Local extends Common {
private $common;
private $count;
public function __construct () {
$this->common = new Common;
$this->count = 50;
}
public function index ($page=0) {
$res = [
'page' => 'local',
'style' => 'videoslist',
'paginate' => $page,
'pagetotal' => 500,
'userinfo' => $this->common->user,
];
$res['video'] = $this->getVideo(($page*$this->count), $this->count);
return view('pages.peertube.videos.local', ['res' => $res]);
}
function getVideo ($start, $count) {
$get = $this->ptapi_get('/api/v1/videos?start='.$start.'&count='.$count.'&sort=-publishedAt&skipCount=true&isLocal=true&nsfw=both');
return $this->vidlist($get);
}
}