Skip to content

Commit

Permalink
Update search description length
Browse files Browse the repository at this point in the history
  • Loading branch information
0x16c3 committed Jan 18, 2022
1 parent 8f66001 commit 7624138
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cogs/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,14 +1213,14 @@ async def _search(self, ctx: SlashContext, media: str, query: str) -> CAnime:
(
(
i.title.english
if len(i.title.english) <= 100
else i.title.english[:97] + "..."
if len(i.title.english) <= 50
else i.title.english[:47] + "..."
)
if hasattr(i.title, "english")
else (
i.title.native
if len(i.title.native) <= 100
else i.title.native[:97] + "..."
if len(i.title.native) <= 50
else i.title.native[:47] + "..."
)
)
if media != "character"
Expand Down Expand Up @@ -1283,14 +1283,14 @@ def check_author(cctx: ComponentContext):
(
(
i.title.english
if len(i.title.english) <= 100
else i.title.english[:97] + "..."
if len(i.title.english) <= 50
else i.title.english[:47] + "..."
)
if hasattr(i.title, "english")
else (
i.title.native
if len(i.title.native) <= 100
else i.title.native[:97] + "..."
if len(i.title.native) <= 50
else i.title.native[:47] + "..."
)
)
if media != "character"
Expand Down

0 comments on commit 7624138

Please sign in to comment.