mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/jxxghp/MoviePilot.git
synced 2026-09-20 08:03:34 +08:00
feat(download): persist poster and backdrop images (#6232)
This commit is contained in:
@@ -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
|
||||
# 下载用户
|
||||
|
||||
@@ -39,8 +39,10 @@ class DownloadHistory(Base):
|
||||
seasons = Column(String)
|
||||
# Exx
|
||||
episodes = Column(String)
|
||||
# 海报
|
||||
# 背景图
|
||||
image = Column(String)
|
||||
# 海报
|
||||
poster = Column(String)
|
||||
# 下载器
|
||||
downloader = Column(String)
|
||||
# 下载任务Hash
|
||||
|
||||
@@ -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
|
||||
# 种子名称
|
||||
|
||||
Reference in New Issue
Block a user