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