Fix bug
This commit is contained in:
parent
a1207d1c11
commit
6eb2aec15a
|
@ -234,8 +234,9 @@ async def main():
|
|||
mimetype = await _get_file_mimetype(filename)
|
||||
if mimetype.startswith('image') and preview and preview['enabled']:
|
||||
preview = preview['images'][0]
|
||||
urls = [preview['source']['url']]
|
||||
urls.extend(reversed(i['url'] for i in preview['resolutions']))
|
||||
urls = [i['url'] for i in preview['resolutions']]
|
||||
urls.append(preview['source']['url'])
|
||||
urls.reverse()
|
||||
for url in urls:
|
||||
if os.path.getsize(filename) < 10000000:
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue