feat 下载中信息增加用户
This commit is contained in:
parent
f5de48ca30
commit
40a77b438e
@ -786,6 +786,7 @@ class DownloadChain(ChainBase):
|
||||
for torrent in torrents:
|
||||
history = self.downloadhis.get_by_hash(torrent.hash)
|
||||
if history:
|
||||
# 媒体信息
|
||||
torrent.media = {
|
||||
"tmdbid": history.tmdbid,
|
||||
"type": history.type,
|
||||
@ -794,6 +795,8 @@ class DownloadChain(ChainBase):
|
||||
"episode": history.episodes,
|
||||
"image": history.image,
|
||||
}
|
||||
# 下载用户
|
||||
torrent.userid = history.userid
|
||||
ret_torrents.append(torrent)
|
||||
return ret_torrents
|
||||
|
||||
|
@ -12,6 +12,7 @@ class TransferTorrent(BaseModel):
|
||||
path: Optional[Path] = None
|
||||
hash: Optional[str] = None
|
||||
tags: Optional[str] = None
|
||||
userid: Optional[str] = None
|
||||
|
||||
|
||||
class DownloadingTorrent(BaseModel):
|
||||
@ -29,6 +30,7 @@ class DownloadingTorrent(BaseModel):
|
||||
upspeed: Optional[str] = None
|
||||
dlspeed: Optional[str] = None
|
||||
media: Optional[dict] = {}
|
||||
userid: Optional[str] = None
|
||||
|
||||
|
||||
class TransferInfo(BaseModel):
|
||||
|
Loading…
x
Reference in New Issue
Block a user