mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
🐛 Fixing Deluge integration
Thanks to @scttcper for fixing https://github.com/scttcper/deluge/issues/106 so quickly !
This commit is contained in:
@@ -24,36 +24,34 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
}
|
||||
if (qBittorrentService) {
|
||||
torrents.push(
|
||||
...(
|
||||
...((
|
||||
await new QBittorrent({
|
||||
baseUrl: qBittorrentService.url,
|
||||
username: qBittorrentService.username,
|
||||
password: qBittorrentService.password,
|
||||
}).getAllData()
|
||||
).torrents
|
||||
).torrents)
|
||||
);
|
||||
}
|
||||
if (delugeService) {
|
||||
const delugeTorrents = (
|
||||
await new Deluge({
|
||||
baseUrl: delugeService.url,
|
||||
username: delugeService.username,
|
||||
password: delugeService.password,
|
||||
}).getAllData()
|
||||
).torrents;
|
||||
delugeTorrents.forEach((delugeTorrent) =>
|
||||
torrents.push({ ...delugeTorrent, progress: delugeTorrent.progress / 100 })
|
||||
torrents.push(
|
||||
...((
|
||||
await new Deluge({
|
||||
baseUrl: delugeService.url,
|
||||
password: delugeService.password,
|
||||
}).getAllData()
|
||||
).torrents)
|
||||
);
|
||||
}
|
||||
if (transmissionService) {
|
||||
torrents.push(
|
||||
...(
|
||||
...((
|
||||
await new Transmission({
|
||||
baseUrl: transmissionService.url,
|
||||
username: transmissionService.username,
|
||||
password: transmissionService.password,
|
||||
}).getAllData()
|
||||
).torrents
|
||||
).torrents)
|
||||
);
|
||||
}
|
||||
res.status(200).json(torrents);
|
||||
|
||||
Reference in New Issue
Block a user