Archived
1
0
Fork 0
This commit is contained in:
yzhh 2021-11-06 20:01:37 +08:00
parent d134ebcfd4
commit eee76bb019
2 changed files with 9 additions and 2 deletions

View file

@ -51,9 +51,13 @@ async def check(*text) -> list:
'''
accessKeyId = Config("Check_accessKeyId")
accessKeySecret = Config("Check_accessKeySecret")
text = list(text)
if not accessKeyId or not accessKeySecret or not EnableDirtyWordCheck.status:
Logger.warn('Dirty words filter was disabled, skip.')
return list(text)
return text
for x in text:
if x == '':
text.remove(x)
if not text:
return []
query_list = {}

View file

@ -235,7 +235,10 @@ async def download_avatar_thumb(link, id):
def make_songcard(workdir, coverpath, chart_type, difficulty, chart_name, score, acc, rt, playtime, rank,
havecover=True):
if havecover:
img = Image.open(coverpath)
try:
img = Image.open(coverpath)
except:
img = Image.new('RGBA', (384, 240), 'black')
else:
img = Image.new('RGBA', (384, 240), 'black')
img = img.convert('RGBA')