fix 订阅创建一分钟内不自动搜索,留出编辑订阅的时间

This commit is contained in:
thsrite
2023-09-01 11:48:31 +08:00
parent fe80f86518
commit 9139c1297e
5 changed files with 42 additions and 1 deletions

View File

@ -49,6 +49,8 @@ class Subscribe(Base):
state = Column(String, nullable=False, index=True, default='N')
# 最后更新时间
last_update = Column(String)
# 创建时间
date = Column(String)
# 订阅用户
username = Column(String)
# 订阅站点

View File

@ -1,3 +1,4 @@
import time
from typing import Tuple, List
from app.core.context import MediaInfo
@ -26,6 +27,7 @@ class SubscribeOper(DbOper):
backdrop=mediainfo.get_backdrop_image(),
vote=mediainfo.vote_average,
description=mediainfo.overview,
date=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
**kwargs)
subscribe.create(self._db)
return subscribe.id, "新增订阅成功"