feat: add transmission client

feat: set defaultPath for any system
This commit is contained in:
MasutaYunikon committed 2026-04-07 19:04:26 +02:00
1 parent 5687aaa5d9
commit f304562f01
4 files changed
+161 -1

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import fs from 'fs'
import os from 'os'
import type { Request, Response } from 'express'
// GET /api/system/info
export function systemInfo(_req: Request, res: Response): void {
const isTermux = fs.existsSync('/data/data/com.termux')
const platform = os.platform()
res.json({
platform,
isTermux,
defaultPath: isTermux ? '/sdcard/' : '/',
})
}