downloading api

This commit is contained in:
jxxghp 2023-07-02 16:21:32 +08:00
parent 174961c32d
commit 2b4b92bfe1
3 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,7 @@ class QbittorrentModule(_ModuleBase):
for torrent in torrents or []:
meta = MetaInfo(torrent.get('name'))
ret_torrents.append(DownloadingTorrent(
hash=torrent.get('hash'),
title=torrent.get('name'),
name=meta.name,
year=meta.year,

View File

@ -116,6 +116,7 @@ class TransmissionModule(_ModuleBase):
for torrent in torrents or []:
meta = MetaInfo(torrent.name)
ret_torrents.append(DownloadingTorrent(
hash=torrent.hashString,
title=torrent.name,
name=meta.name,
year=meta.year,

View File

@ -181,6 +181,7 @@ class TransferTorrent(BaseModel):
class DownloadingTorrent(BaseModel):
hash: Optional[str] = None
title: Optional[str] = None
name: Optional[str] = None
year: Optional[str] = None