rookie mistake

This commit is contained in:
reality 2016-02-21 20:06:51 +00:00
parent 8ce27053ce
commit 6038443225
2 changed files with 11 additions and 5 deletions

View File

@ -11,14 +11,20 @@ var rt = function(dbot) {
this.internalAPI = { this.internalAPI = {
'formatLink': function(m) { 'formatLink': function(m) {
var rating = m.ratings.audience_score; var aRating = m.ratings.audience_score;
var rColour = (rating <= 5) ? '\u00033 ' : '\u00034 '; var cRating = m.ratings.critics_score;
rating = rColour + String(rating) + '%\u000f';
var aColour = (aRating <= 5) ? '\u00033 ' : '\u00034 ';
aRating = aColour + String(aRating) + '%\u000f';
var cColour = (cRating <= 5) ? '\u00033 ' : '\u00034 ';
cRating = cColour + String(cRating) + '%\u000f';
var mString = dbot.t('rt_film', { var mString = dbot.t('rt_film', {
'title': m.title, 'title': m.title,
'year': m.year, 'year': m.year,
'rating': rating 'audience_rating': aRating,
'critic_rating': cRating
}); });
if(_.has(m, 'directors')) mString += ' [Director: ' + m.directors[0] + ']'; if(_.has(m, 'directors')) mString += ' [Director: ' + m.directors[0] + ']';

View File

@ -1,6 +1,6 @@
{ {
"rt_film": { "rt_film": {
"en": "[{title} -{rating} - {year}]", "en": "[{title} - Audience:{audience_rating} - Critic:{critic_rating} - {year}]",
"de": "[{title} -{rating} - {year}]" "de": "[{title} -{rating} - {year}]"
}, },
"rt_noresults": { "rt_noresults": {