Fixed deprecation warnings and improved compatibility with newer versions.

This commit is contained in:
benson
2025-10-09 16:46:28 +08:00
parent b97c6e9c7a
commit 2be9ec0512
10 changed files with 57 additions and 44 deletions

View File

@@ -11,7 +11,6 @@ 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
@@ -34,9 +33,9 @@ class Aria2Controller extends Controller
$this->uid = $UserId;
$this->l10n = $IL10N;
$this->rootFolder = $rootFolder;
$this->urlGenerator = \OC::$server->getURLGenerator();
$this->urlGenerator = \OC::$server->get(\OCP\IURLGenerator::class);
$this->downloadDir = Helper::getDownloadDir();
OC_Util::setupFS();
\OC_Util::setupFS();
//$this->config = \OC::$server->getAppConfig();
$this->aria2 = $aria2;
$this->aria2->init();