mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 21:02:38 +00:00
Merge branch 'dev'
This commit is contained in:
commit
dc866d1564
2 changed files with 7 additions and 5 deletions
|
@ -728,8 +728,10 @@ class MsG(cmds.Cog):
|
|||
except exc.Continue:
|
||||
continue
|
||||
if post['id'] not in posts.keys() and post['id'] not in previous.keys():
|
||||
posts[post['id']] = {'artist': ', '.join(
|
||||
post['tags']['artist']), 'file_url': post['file']['url'], 'score': post['score']['total']}
|
||||
posts[post['id']] = {
|
||||
'artist': ', '.join(post['tags']['artist']) if post['tags']['artist'] else 'unknown',
|
||||
'file_url': post['file']['url'],
|
||||
'score': post['score']['total']}
|
||||
if len(posts) == limit:
|
||||
break
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ async def query_kheina(url):
|
|||
|
||||
result = {
|
||||
'source': content['results'][0]['sources'][0]['source'],
|
||||
'artist': content['results'][0]['sources'][0]['artist'],
|
||||
'artist': content['results'][0]['sources'][0]['artist'] if content['results'][0]['sources'][0]['artist'] else 'unknown',
|
||||
'thumbnail': thumbnail,
|
||||
'similarity': str(similarity),
|
||||
'database': tld.extract(content['results'][0]['sources'][0]['source']).domain
|
||||
|
@ -99,12 +99,12 @@ async def query_saucenao(url):
|
|||
source = e
|
||||
break
|
||||
|
||||
artist = 'Unknown'
|
||||
artist = 'unknown'
|
||||
for e in (
|
||||
'author_name',
|
||||
'member_name',
|
||||
'creator'):
|
||||
if e in match['data']:
|
||||
if e in match['data'] and match['data'][e]:
|
||||
artist = match['data'][e]
|
||||
break
|
||||
|
||||
|
|
Loading…
Reference in a new issue