deluge
v7.0.0
使用 ofetch 用于 deluge 的 TypeScript api 包装器
npm install @ctrl/deluge
import { Deluge } from '@ctrl/deluge' ;
const client = new Deluge ( {
baseUrl : 'http://localhost:8112/' ,
password : 'deluge' ,
} ) ;
async function main ( ) {
const res = await client . getAllData ( ) ;
console . log ( res ) ;
}
文档:https://deluge.vercel.app
这些功能已在 torrent 客户端之间标准化。可以轻松支持多个 torrent 客户端。请参阅下文了解受支持的替代 torrent 客户端
返回所有 torrent 数据和标签对象数组。数据已标准化,与本机listTorrents()
的输出不匹配。
const data = await client . getAllData ( ) ;
console . log ( data . torrents ) ;
返回一份 torrent 数据
const data = await client . getTorrent ( ) ;
console . log ( data ) ;
暂停或恢复 torrent
const paused = await client . pauseTorrent ( ) ;
console . log ( paused ) ;
const resumed = await client . resumeTorrent ( ) ;
console . log ( resumed ) ;
删除种子。默认情况下不删除磁盘上的数据。
// does not remove data on disk
const result = await client . removeTorrent ( 'torrent_id' , false ) ;
console . log ( result ) ;
// remove data on disk
const res = await client . removeTorrent ( 'torrent_id' , true ) ;
console . log ( res ) ;
传输 - https://github.com/scttcper/transmission
qbittorrent - https://github.com/scttcper/qbittorrent
utorrent - https://github.com/scttcper/utorrent
rtorrent - https://github.com/scttcper/rtorrent
docker run -d
--name=deluge
-e PUID=1000
-e PGID=1000
-e TZ=Etc/UTC
-e DELUGE_LOGLEVEL=error `#optional`
-p 8112:8112
-p 6881:6881
-p 6881:6881/udp
--restart unless-stopped
lscr.io/linuxserver/deluge:latest