mirror of https://github.com/searxng/searxng.git
[fix] engine genius should not use the video template
Remove 'template' from result. Engine genius should not use the video template. BTW: fix indentations Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
3a71d4b175
commit
f963759ccc
|
@ -48,11 +48,12 @@ def parse_lyric(hit):
|
||||||
logger.error(e, exc_info=True)
|
logger.error(e, exc_info=True)
|
||||||
content = ''
|
content = ''
|
||||||
timestamp = hit['result']['lyrics_updated_at']
|
timestamp = hit['result']['lyrics_updated_at']
|
||||||
result = {'url': hit['result']['url'],
|
result = {
|
||||||
'title': hit['result']['full_title'],
|
'url': hit['result']['url'],
|
||||||
'content': content,
|
'title': hit['result']['full_title'],
|
||||||
'thumbnail': hit['result']['song_art_image_thumbnail_url'],
|
'content': content,
|
||||||
'template': 'videos.html'}
|
'thumbnail': hit['result']['song_art_image_thumbnail_url'],
|
||||||
|
}
|
||||||
if timestamp:
|
if timestamp:
|
||||||
result.update({'publishedDate': datetime.fromtimestamp(timestamp)})
|
result.update({'publishedDate': datetime.fromtimestamp(timestamp)})
|
||||||
return result
|
return result
|
||||||
|
@ -69,12 +70,12 @@ def parse_artist(hit):
|
||||||
|
|
||||||
|
|
||||||
def parse_album(hit):
|
def parse_album(hit):
|
||||||
result = {'url': hit['result']['url'],
|
result = {
|
||||||
'title': hit['result']['full_title'],
|
'url': hit['result']['url'],
|
||||||
'thumbnail': hit['result']['cover_art_url'],
|
'title': hit['result']['full_title'],
|
||||||
'content': '',
|
'thumbnail': hit['result']['cover_art_url'],
|
||||||
# 'thumbnail': hit['result']['cover_art_thumbnail_url'],
|
'content': '',
|
||||||
'template': 'videos.html'}
|
}
|
||||||
try:
|
try:
|
||||||
year = hit['result']['release_date_components']['year']
|
year = hit['result']['release_date_components']['year']
|
||||||
except Exception as e: # pylint: disable=broad-except
|
except Exception as e: # pylint: disable=broad-except
|
||||||
|
|
Loading…
Reference in New Issue