forked from GitHub/dbot
rookie mistake
This commit is contained in:
parent
8ce27053ce
commit
6038443225
@ -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] + ']';
|
||||||
|
@ -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": {
|
||||||
|
Loading…
Reference in New Issue
Block a user