add speed
This commit is contained in:
parent
d2152c4341
commit
31b0d061b4
@ -140,7 +140,9 @@ class QbittorrentModule(_ModuleBase):
|
||||
year=meta.year,
|
||||
season_episode=meta.season_episode,
|
||||
progress=torrent.get('progress'),
|
||||
size=torrent.get('total_size')
|
||||
size=torrent.get('total_size'),
|
||||
dlspeed=StringUtils.str_filesize(torrent.get('dlspeed')),
|
||||
upspeed=StringUtils.str_filesize(torrent.get('upspeed')),
|
||||
))
|
||||
else:
|
||||
return None
|
||||
|
@ -8,6 +8,7 @@ from app.modules import _ModuleBase
|
||||
from app.modules.transmission.transmission import Transmission
|
||||
from app.schemas import TransferInfo, TransferTorrent, DownloadingTorrent
|
||||
from app.schemas.types import TorrentStatus
|
||||
from app.utils.string import StringUtils
|
||||
|
||||
|
||||
class TransmissionModule(_ModuleBase):
|
||||
@ -122,7 +123,9 @@ class TransmissionModule(_ModuleBase):
|
||||
year=meta.year,
|
||||
season_episode=meta.season_episode,
|
||||
progress=torrent.progress,
|
||||
size=torrent.total_size
|
||||
size=torrent.total_size,
|
||||
dlspeed=StringUtils.str_filesize(torrent.download_speed),
|
||||
ulspeed=StringUtils.str_filesize(torrent.upload_speed),
|
||||
))
|
||||
else:
|
||||
return None
|
||||
|
@ -189,6 +189,8 @@ class DownloadingTorrent(BaseModel):
|
||||
size: Optional[float] = 0
|
||||
progress: Optional[float] = 0
|
||||
state: Optional[str] = 'downloading'
|
||||
upspeed: Optional[str] = None
|
||||
dlspeed: Optional[str] = None
|
||||
media: Optional[dict] = {}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user