Update shiro.py

master
Arjix 2021-02-14 17:17:15 +02:00 committed by GitHub
parent f1de3abd84
commit 97520cbc1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -32,13 +32,14 @@ class Shiro(Anime, sitename='shiro'):
title=i['name'], title=i['name'],
url='https://shiro.is/anime/' + i['slug'], url='https://shiro.is/anime/' + i['slug'],
poster='https://ani-cdn.api-web.site/' + i['image'], poster='https://ani-cdn.api-web.site/' + i['image'],
meta={'year': i['year']},
meta_info={ meta_info={
'version_key_dubbed': '(Sub)' if i['language'] == 'subbed' else '(Dub)' # noqa 'version_key_dubbed': '(Sub)' if i['language'] == 'subbed' else '(Dub)' # noqa
} }
) )
for i in results for i in results
] ]
search_results = sorted(search_results, key=lambda x: len(x.title)) search_results = sorted(search_results, key=lambda x: int(x.meta['year']))
return search_results return search_results
else: else:
return [] return []