Re-added rating

This commit is contained in:
Luke Rogers 2012-03-04 13:47:14 +13:00
parent be35cc586a
commit 7e3ce7ddba

View file

@ -37,6 +37,10 @@ def get_video_description(vid_id):
out += '%dm ' % (length / 60 % 60)
out += "%ds\x02" % (length % 60)
if 'rating' in j:
out += ' - rated \x02%.2f/5.0\x02 (%d)' % (j['rating'],
j['ratingCount'])
if 'viewCount' in j:
out += ' - \x02%s\x02 views' % locale.format('%d',
j['viewCount'], 1)