initial commit

This commit is contained in:
root committed 2026-11-09 02:00:13 +04:00
commit 19fe71b4c1
33 files changed
+557

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
require_once('../../php/util.php');
require_once('../../php/settings.php');
eval(FileUtil::getPluginConf('multidisk'));
if (empty($partitionDirectories)) {
if (User::isLocalMode() && rTorrentSettings::get()->linkExist && file_exists(rTorrentSettings::get()->directory)) {
$partitionDirectories = [rTorrentSettings::get()->directory => ''];
} else {
$partitionDirectories = [$topDirectory => ''];
}
}
$ret = [];
foreach (array_keys($partitionDirectories) as $dir) {
$item = [
"total" => 0,
"free" => 0,
];
if (is_dir($dir)) {
$item["total"] = disk_total_space($dir);
$item["free"] = disk_free_space($dir);
}
$ret[] = $item;
}
CachedEcho::send(JSON::safeEncode($ret), "application/json");