An attempt to obtain a functional version with the various fixes implemented so far.

This commit is contained in:
darkpisto
2025-12-11 14:05:40 +01:00
parent 6a36b24162
commit ddcaf72e6e
13 changed files with 65 additions and 57 deletions

View File

@@ -11,6 +11,7 @@ use OCP\AppFramework\Http\JSONResponse;
use OCP\Files\IRootFolder;
use OCP\IL10N;
use OCP\IRequest;
use OC_Util;
use \OC\Files\Filesystem;
class Aria2Controller extends Controller
@@ -33,9 +34,9 @@ class Aria2Controller extends Controller
$this->uid = $UserId;
$this->l10n = $IL10N;
$this->rootFolder = $rootFolder;
$this->urlGenerator = \OC::$server->get(\OCP\IURLGenerator::class);
$this->urlGenerator = \OC::$server->getURLGenerator();
$this->downloadDir = Helper::getDownloadDir();
\OC_Util::setupFS();
OC_Util::setupFS();
//$this->config = \OC::$server->getAppConfig();
$this->aria2 = $aria2;
$this->aria2->init();

View File

@@ -15,6 +15,7 @@ use OCP\AppFramework\Http\TemplateResponse;
//use OCP\Files\IRootFolder;
use OCP\IL10N;
use OCP\IRequest;
use OC_Util;
use OCP\Util;
class MainController extends Controller
@@ -46,7 +47,7 @@ class MainController extends Controller
//$this->rootFolder = $rootFolder;
$this->aria2 = $aria2;
$this->aria2->init();
$this->urlGenerator = \OC::$server->get(\OCP\IURLGenerator::class);
$this->urlGenerator = \OC::$server->getURLGenerator();
$this->dbconn = new DbHelper();
$this->counters = new Counters($aria2, $this->dbconn, $UserId);
$this->ytdl = $ytdl;
@@ -63,8 +64,8 @@ class MainController extends Controller
{
// $str = \OC::$server->getDatabaseConnection()->getInner()->getPrefix();
//$config = \OC::$server->getAppConfig();
Util::addScript($this->appName, 'app');
Util::addStyle($this->appName, 'app');
Util::addInitScript($this->appName, 'app');
OC_Util::addStyle($this->appName, 'app');
$params = $this->buildParams();
$response = new TemplateResponse($this->appName, 'Index', $params);

View File

@@ -23,7 +23,7 @@ class SearchController extends Controller
parent::__construct($appName, $request);
$this->appName = $appName;
$this->uid = $UserId;
$this->urlGenerator = \OC::$server->get(\OCP\IURLGenerator::class);
$this->urlGenerator = \OC::$server->getURLGenerator();
$this->search = new siteSearch();
}
/**

View File

@@ -32,7 +32,7 @@ class YtdlController extends Controller
parent::__construct($appName, $request);
$this->appName = $appName;
$this->uid = $UserId;
$this->urlGenerator = \OC::$server->get(\OCP\IURLGenerator::class);
$this->urlGenerator = \OC::$server->getURLGenerator();
$this->l10n = $IL10N;
$this->downloadDir = Helper::getDownloadDir();
$this->dbconn = new DbHelper();