Skip to content

Commit

Permalink
Merge pull request #333 from EstrellaXD/3.0-dev
Browse files Browse the repository at this point in the history
3.0.7
  • Loading branch information
EstrellaXD authored Jun 14, 2023
2 parents 750b7e6 + 4748685 commit f1c4e02
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/module/database/bangumi.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ def search_official_title(self, official_title: str) -> BangumiData | None:
return self.__db_to_data(dict_data)

def match_poster(self, bangumi_name: str) -> str:
condition = {"_custom_condition": "INSTR(:bangumi_name, official_title) > 0"}
keys = ["official_title", "poster_link"]
data = self._search_data(
table_name=self.__table_name,
keys=keys,
condition=condition,
)
data = self._cursor.execute(
"""
SELECT official_title, poster_link FROM bangumi
WHERE INSTR(:title_raw, title_raw) > 0
""",
{"title_raw": bangumi_name},
).fetchone()
if not data:
return ""
official_title, poster_link = data
Expand Down

0 comments on commit f1c4e02

Please sign in to comment.