feat(download): persist poster and backdrop images (#6232)

This commit is contained in:
jxxghp
2026-08-03 21:38:26 +08:00
committed by GitHub
parent 36dd381260
commit a700ba9379
9 changed files with 128 additions and 8 deletions

View File

@@ -951,6 +951,7 @@ class DownloadChain(ChainBase):
seasons=_meta.season,
episodes=download_episodes or _meta.episode,
image=_media.get_backdrop_image(),
poster=_media.get_poster_image(),
downloader=_downloader,
download_hash=_hash,
torrent_name=_torrent.title,
@@ -1777,7 +1778,9 @@ class DownloadChain(ChainBase):
"title": history.title,
"season": history.seasons,
"episode": history.episodes,
"image": history.image,
"image": history.poster,
"poster": history.poster,
"backdrop": history.image,
}
torrent.site_name = history.torrent_site
# 下载用户

View File

@@ -39,8 +39,10 @@ class DownloadHistory(Base):
seasons = Column(String)
# Exx
episodes = Column(String)
# 海报
# 背景图
image = Column(String)
# 海报
poster = Column(String)
# 下载器
downloader = Column(String)
# 下载任务Hash

View File

@@ -4,6 +4,10 @@ from pydantic import BaseModel, ConfigDict, Field
class DownloadHistory(BaseModel):
"""
下载历史记录
"""
# ID
id: int
# 保存路程
@@ -34,8 +38,10 @@ class DownloadHistory(BaseModel):
seasons: Optional[str] = None
# 集Exx
episodes: Optional[str] = None
# 海报
# 背景图
image: Optional[str] = None
# 海报
poster: Optional[str] = None
# 下载器Hash
download_hash: Optional[str] = None
# 种子名称