Fix Error on videos with no likes/dislikes

Error 500 was displayed on some videos which had 0 likes or 0 dislikes, as the returned type was None. It was already treated but not used
This commit is contained in:
pluja 2020-11-04 08:28:14 +01:00
parent 9e7af17c73
commit b84dc6dcc4

View File

@ -43,7 +43,7 @@ def get_info(url):
else: else:
video['dislike_count'] = int(info['dislike_count']) video['dislike_count'] = int(info['dislike_count'])
video['total_likes'] = info['dislike_count'] + info['like_count'] video['total_likes'] = video['dislike_count'] + video['like_count']
video['average_rating'] = str(info['average_rating'])[0:4] video['average_rating'] = str(info['average_rating'])[0:4]
video['formats'] = get_video_formats(info['formats']) video['formats'] = get_video_formats(info['formats'])