mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 02:30:01 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
401886805b | ||
|
|
efcdf79f57 | ||
|
|
616f215075 |
+1
-1
@@ -1 +1 @@
|
|||||||
__version__: v0.0.4.6
|
__version__: v0.0.4.7
|
||||||
|
|||||||
@@ -172,3 +172,4 @@ class Setu(db.Model):
|
|||||||
获取所有图片对象
|
获取所有图片对象
|
||||||
"""
|
"""
|
||||||
return await cls.query.gino.all()
|
return await cls.query.gino.all()
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ async def get_setu_list(
|
|||||||
index: Optional[int] = None, tags: Optional[List[str]] = None, r18: int = 0
|
index: Optional[int] = None, tags: Optional[List[str]] = None, r18: int = 0
|
||||||
) -> "list, int":
|
) -> "list, int":
|
||||||
if index:
|
if index:
|
||||||
image_count = await Setu.get_image_count(r18)
|
image_count = await Setu.get_image_count(r18) - 1
|
||||||
if index < 0 or index > image_count:
|
if index < 0 or index > image_count:
|
||||||
return [f"超过当前上下限!({image_count})"], 999
|
return [f"超过当前上下限!({image_count})"], 999
|
||||||
image_list = [await Setu.query_image(index, r18=r18)]
|
image_list = [await Setu.query_image(index, r18=r18)]
|
||||||
|
|||||||
Reference in New Issue
Block a user